#9837 closed enhancement (fixed)
Provide ShowBlockNodes plugin for dijit.Editor
Reported by: | Jared Jurkiewicz | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Editor | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Provide ShowBlockNodes? plugin for dijit.Editor
This is a ticket for a small enhancement to editor that is useful when editing a document online, the ShowBlockNodes?. The plugin uses CSS updates in the editor to show you the basic structure (layout), being used in the underlying html rendering the rich text. This can be extremely helpful if something isn't laying out right to see why.
Of course, it's only generally helpful to those who know HTML too. Still, it's a ncie to have plugin at times and helps our editor feature set.
Not much code and easy to add.
Working on testcase now.
Change History (9)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Type: | defect → enhancement |
comment:2 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 11 years ago by
thanks for the plugin.
I have some small suggestions:
- in _initButton: dojo.hitch is not needed in this.connect(this.button, "onChange", dojo.hitch(this, this._showBlocks));
- in bottom of _initButton: no need to create an anonymouse function to wrap this.toggle()
- the first line in _showBlocks: "this.editor.iframe.contentWindow.document;" can be changed to "this.editor.document"
I believe the reason for the need of _calcBaseUrl is that, in webkit, it does not assign a <base> tag to the iframe for the editor (due to the fact that we are setting the iframe src to "javascript:..."). I think maybe it's a good idea to explicitly set a <base> to the content html in the iframe.
it may actually be easier to use a css file (instead of dynamically inserting the css rules to the iframe).
comment:5 Changed 11 years ago by
(In [20047]) Minor tweak to the ShowBlockNodes? enhancement, need to compute baseUrl better for absolute paths in the module url. refs #9837
(In [20025]) Adding in the show block nodes plugin. fixes #9837