#7240 closed New Feature (fixed)
CKEditor should expose the names/ids of dialog windows, tabs and fields
Reported by: | Anna Tomanek | Owned by: | Sa'ar Zac Elias |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.6 |
Component: | UI : Dialogs | Version: | 3.0 |
Keywords: | Cc: |
Description
These values are crucial for all sorts of customizations and it is vital that we make them accessible to developers. By accessible I don't mean having to search for them somewhere inside the millions of lines of CKEditor source code.
This information must be available in the API docs and auto-updated on all changes of the dialog window source codes.
Please note this is also one of the most asked for problem areas on our forum.
Attachments (6)
Change History (28)
comment:1 Changed 14 years ago by
Keywords: | Discussion added |
---|
comment:2 Changed 14 years ago by
What about a plugin that shows tooltips when rolling-over the dialog elements?
comment:3 Changed 14 years ago by
Considering that this information is to be viewed by developers, I don't think that adding attribute or a tooltip plugin is the right way to go.
I tend to agree with Anna more here, we can develop a tool that creates a list of dialog, tab and field names into a special document that is to be distributed or put online.
If we go "old fashion", we can even do that manually as changes in dialog names/tab names/field names is rather rare.
comment:4 Changed 14 years ago by
I meant a developer plugin in fact, which must be enable by hand, just like the uicolor plugin. It could also include other information, like the element type. It'll be definitely usable... it's enough to open the dialog and have everything there, including custom fields, which would not be documented by us.
comment:6 Changed 14 years ago by
A tooltip plugin sounds like a way to go.
The problem with having it described in the documentation is that:
- Some dialogs contain lot of elements, so the list of elements for the Link dialog would be long, how could you design it so that it was easy to find the element you're looking for?
- Dialogs added by thirdparty plugins will still not be documented
- Such a tooltip plugin could show even much more information in the future, like the current definition of this element etc.
comment:8 Changed 14 years ago by
Status: | new → confirmed |
---|
Sounds great to me, too, and I am sure this tool will really help the developers get up to speed with customizing CKEditor. As stated above, it can also be extended to cover other functionalities dedicated to CKEditor developers so I am all for that.
comment:9 Changed 14 years ago by
Owner: | set to Sa'ar Zac Elias |
---|---|
Status: | confirmed → assigned |
Changed 14 years ago by
Attachment: | 7240.patch added |
---|
comment:10 Changed 14 years ago by
Status: | assigned → review |
---|
comment:11 Changed 14 years ago by
Great job, Saar, I really like it.
One problem I see is that the tooltips seem to interfere with the input fields that they cover:
- If you click the text field inside the tooltip and try to write something, the characters are not entered.
- If you click the text field outside the tooltip, the characters are entered, but the tooltip covers them so it's not immediately clear whether filling the field works or not.
Perhaps the click event on the field should cause the tooltip to hide and uncover the field?
Would it make any sense to also show the ids of the dialog window buttons? I can see the "Clear" button from the color picker has a tooltip, for example, while in the Selection Field dialog window the "Down" button has one (albeit with "undefined" id) and the rest of them don't. Is removing the buttons a valid use case for CKEditor developers?
Changed 14 years ago by
Attachment: | 7240_2.patch added |
---|
comment:12 Changed 14 years ago by
New patch covers everything me and Anna have discussed about, including:
- Some buttons didn't have tooltips.
- Tooltips for tab names as well.
- Positioning of the tooltip now doesn't interupt editing.
- Added padding for text.
comment:13 Changed 14 years ago by
Status: | review → review_failed |
---|
- Is it possible to display the tooltip straight below the element? When viewing the Link dialog, the tooltip for the URL field looks a bit bad on the right side.
- How about using something like:
<div tabindex="-1" id="cke_tooltip" style="z-index: 10020; top: 513.5px; left: 681px; display: block; padding: 5px; opacity: 1; border: 2px solid #333;"> <h2 style="font-size: 1.1em; border-bottom: 1px solid; margin: 0; padding: 0 5px 5px 0;">Element information</h2> <ul style="padding: 0pt; list-style-type: none;"> <li><strong>Dialog name:</strong> link<br></li> <li><strong>Tab id:</strong> info</li> <li><strong>Element id:</strong> url</li> <li><strong>Element type:</strong> <a style="color:white" href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.textInput.html" target="_blank">text</a></li> </ul> </div>
to display the tooltip? I'd format a bit the tooltip box and add an extra information: the type of the element with a direct link to the documentation about it.
- When element ID is undefined, I'd display something like "not set".
- In the second patch lang/en.js is missing.
- Do we really need to add CSS rules to _source/skins/xyz/dialog.css? I'd say that plugins should be totally separated from the editor.
- The scaytcheck dialog is broken when this plugin is enabled:
el is null el.on( 'mouseover', function(), line 100
Changed 14 years ago by
Attachment: | 7240_3.patch added |
---|
comment:14 Changed 14 years ago by
Status: | review_failed → review |
---|
Putting <not set> instead of a missing ID is not relevant, as the whole dialog system relies on the element IDs, and the plugin will silently fail without them (the cause of the last bug described by Anna in comment:11). We should make suere we got IDs all across our core dialog. The patch handles the ones Wiktor and I found.
Besides that, everything we've discussed about and an additional minor bug fix are included in the 3rd patch.
comment:15 Changed 14 years ago by
I really love the current version, from the user's perspective, that is. This is even better than I initially thought we can come up with -- great job, Saar. I am sure this will become an invaluable tool for the CKEditor developers. R+ from me.
comment:16 Changed 14 years ago by
Keywords: | Discussion removed |
---|---|
Milestone: | → CKEditor 3.6 |
Type: | Task → New Feature |
comment:17 Changed 14 years ago by
Status: | review → review_failed |
---|
Nothing to add. Nice job!
Please just remove the "dialog" require. This tool should not change the editor. So it should not load the dialog plugin if no other plugin is loading it.
Changed 14 years ago by
Attachment: | 7240_4.patch added |
---|
comment:18 Changed 14 years ago by
Status: | review_failed → review |
---|
comment:19 Changed 14 years ago by
Status: | review → review_passed |
---|
comment:20 Changed 14 years ago by
There's something very obvious missing in the patch, and it's a sample page with the plugin so people can use it easily, as well as allowing us to use it at any time in the rev. site.
I would suggest to apply the approved patch and then add a simple test page (another extra plugin with missing sample is the tableresize)
comment:21 Changed 14 years ago by
Good catch, Alfonso. Attached is my proposal (devtools.html
sample) and a modified index.html
file from the _samples
folder.
comment:22 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
HOW DID WE NOT THINK OF THAT?! ;)
Thanks Alfonso, Anna.
Fixed with [6679].
When CKEditor is running source mode we could add an extra attribute to each UI element in the dialog, which would hold the real path to the element: "tabId:elementId".
This way, when using the inspector in Firebug on the URL field of the Image dialog, instead of the following:
one would see also:
In release version this extra information could be hidden, to avoid performance issues.