Disable Visual Content Editor

Topics: Visual editor
May 25, 2011 at 1:04 AM

Hi,

Is there any way to disable the visual content editor when editing a page? A few strange things are happening, such as <b> tags being converted to <strong>. I would prefer to edit the html directly and then use the preview panel to view the page instead of using the visual content editor. The visual editor ignores the custom css anyway , so it is not that practical.

Thanks!

Larry

Coordinator
May 25, 2011 at 8:45 AM

Hi Larry,

you would need to dig into the code to get this - there isn't a switch that does this and looking through the code did not show any easy fix. The page visual editor is special in that is can handle N html documents, and there isn't a equivalent "source only" editor. Also the current editor has some client logic which will feed the visual editor with html first as part of its initialization and that is what you do not want.

If you wish to dig into the code, you can find natural insertion points here:

  • ~\Composite\controls\FormsControls\FormUiControlTemplates\RichContent\MultiContentXhtmlEditor.ascx
    What asp.net use to spawn of the page visual editor - the actual html to be edited is emitted here and wrapped in <textarea /> and other markup which make the client unfold the editor.
  • ~\Composite\content\misc\editors\visualeditor
    Defines a single editor instance - I expect you can edit this one and have all visual editors change across the entire system
  • ~\Composite\scripts\source\top\ui\bindings\editors\visualeditor\multieditor
    The javascript which create the 'multi html editor' which is used when editing a page
    (this file exists in the source code version of Composite C1 which is downloadable here at CodePlex - this file is 'crunched' in the installable versions of Composite C1)

Sorry that I can't help more than this.

May 31, 2011 at 2:16 AM

Thanks for the info. The desired behaviour would be for the content editor to function like the page template editor. i.e. just plain html...

Regards,

Larry

Melbourne, Australia