Documentation
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.
// HTML
<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.