Hey, there! Look at our new WYSIWYG editor.

Show the code first

Sometimes, you need to show the HTML source code of Redactor first, instead of the visual layer. To do this, use the showSource option.

<textarea id="#content"></textarea>

// Call Redactor
$R('#content', { showSource: true });

ShowSource mode will not be enabled if:

  • Redactor launched for inline tag or with inline option;
  • Redactor launched in Click-to-edit mode;
  • The html/source button is turned off in the toolbar.

Please, see the example.