Content Editor in HTML mode?

Posted by Community Admin on 03-Aug-2018 23:22

Content Editor in HTML mode?

All Replies

Posted by Community Admin on 21-Jul-2011 00:00

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

Posted by Community Admin on 27-Jul-2011 00:00

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>
 and implement your custom logic there.

Regards,
Boyan Barnev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed