We're wanting to use RadEditor as a robust TextArea replacement, and we want the user to have access to the full array of tools, but only if they ask for them by clicking on an icon.
We're doing this now, by hiding all of the EditorTool buttons when the Editor is loaded, but this is leaving behind a bunch of empty EditorToolGroups. Is there a way to show/hide an EditorToolGroup instead?
var oTool;
oTool = editor.getToolByName("Undo"); if (oTool) oTool.get_element().style.display = "none";
I've attached screenshots of what it looks like when the toolbars are closed
and opened
.
We found our answer.
Since we want to show/hide entire EditorToolGroups, and the format of these groups when using
ContentAreaMode='Div'is consistent (<div><ul><li><a>), we're now doing the following:(each EditorTool is an
<a>tag, so we need two parentNodes to get to the<ul>)To Hide:
To Show:
This should work for us so long as the final rendering format of EditorTools doesn't change when using
ContentAreaMode='Div'