Content Editor in HTML mode?
Is it possible to have the content editor tools available when editing in HTML mode? Sort of like how you are still able to access and drag Visual Studio tools even when in Code view.
I have a HTML/CSS/JS mega menu running on my site. I have the HTML stored in a Content Module that I go into and edit by hand. It would be much easier and more efficient if I could use the links generated by the Sitefinity hyperlink tool into the html view rather than having to code each fully-qualified path for every page.
Anthony
Hello Anthony,
I'm afraid this would not be possible. Let me elabvorate a little bit more on the default functionality and why is it working this way. The content area of RadEditor in HTML mode is a standard textarea and the built-in tools of the editor are designed to work in the editable iframe area in design mode. There might be a workaround for this, but it's not that trivial. Still, if you would like you can get a reference to this textarea in HTML mode via the editor.get_textArea() method:
<telerik:RadEditor ID=
"RadEditor1"
runat=
"server"
OnClientModeChange=
"OnClientModeChange"
></telerik:RadEditor>
<script type=
"text/javascript"
>
function
OnClientModeChange(editor)
if
(editor.get_mode() == 2)
var
textArea = editor.get_textArea();
alert(textArea);
//attach to the onpaste browser event and obtain the content from clipboard - this feature is browser specific and does not work in all browsers
</script>