Howdy,
I just finishing battling getting the MOSSRadEditor into WSS3. The hyperlink manager works and things look good. Before I switched to MOSSRadEditor I was using RadEditor and it worked very well, I specified font sizes, and some custom toolbars. When I switch it to MOSSRadEditor I lost all of this cool stuff, AND the toolbar only appears when I click the content area, I'd rather it stay available at all times.
Here's my HTML
Some javascript
code behind is
and the display is attached.
I just finishing battling getting the MOSSRadEditor into WSS3. The hyperlink manager works and things look good. Before I switched to MOSSRadEditor I was using RadEditor and it worked very well, I specified font sizes, and some custom toolbars. When I switch it to MOSSRadEditor I lost all of this cool stuff, AND the toolbar only appears when I click the content area, I'd rather it stay available at all times.
Here's my HTML
| <rad:MOSSRadEditor ID="RadEditor1" runat="server" ToolbarMode="Default" ToolsFile="tools.xml" |
| ContentAreaCssFile="edit.css" OnClientCommandExecuting="OnClientCommandExecuting"> |
| <realfontsizes> |
| <telerik:EditorRealFontSize Value="10pt" /> |
| <telerik:EditorRealFontSize Value="12pt" /> |
| <telerik:EditorRealFontSize Value="14pt" /> |
| <telerik:EditorRealFontSize Value="16pt" /> |
| <telerik:EditorRealFontSize Value="18pt" /> |
| </realfontsize> |
Some javascript
| <script type="text/javascript"> |
| //<![CDATA[ |
| function OnClientCommandExecuting(editor, args) { |
| var name = args.get_name(); //The command name |
| var val = args.get_value(); //The tool that initiated the command |
| if (name == "DynamicDropdown" || name == "DynamicSplitButton") { |
| editor.pasteHtml(val); |
| //Cancel the further execution of the command |
| args.set_cancel(true); |
| } |
| } |
| //]]> |
| </script> |
code behind is
| EditorToolGroup toolbar = new EditorToolGroup(); |
| RadEditor1.Tools.Add(toolbar); |
| EditorDropDown ddn = new EditorDropDown("DynamicDropdown"); |
| ddn.Text = "Layout Elements"; |
| ddn.Attributes["width"] = "110px"; |
| ddn.Attributes["popupwidth"] = "240px"; |
| ddn.Attributes["popupheight"] = "100px"; |
| ddn.Items.Add("2 Column Table", "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"620\"><tbody><tr><td style=\"font-weight: bold\" valign=\"top\" width=\"120\"></td>" + |
| "<td valign=\"top\" width=\"400\"></td></tr><tr><td colspan=\"2\"><hr/></td></tr><tr><td style=\"font-weight: bold\" valign=\"top\" width=\"120\"></td>" + |
| "<td valign=\"top\" width=\"400\"></td></tr><tr><td colspan=\"2\"><hr/></td></tr><tr><td style=\"font-weight: bold\" valign=\"top\" width=\"120\"></td>" + |
| "<td valign=\"top\" width=\"400\"></td></tr></tbody></table><p> </p><p> </p>"); |
| ddn.Items.Add("Page Break", "<div class=\"page_break\" style=\"page-break-after:always\"></div>"); |
| ddn.Items.Add("Section Header", "<table border=\"1\" style=\"border-color: Black;\" width=\"620px\" cellpadding=\"5\" cellspacing=\"0\">" + |
| "<tr class=\"borderedtitle\"><td>V. Section Title</td></tr></table><p> </p><p> </p>"); |
| toolbar.Tools.Add(ddn); |
| RadEditor1.ToolbarMode = EditorToolbarMode.Default; |
and the display is attached.