Examples
Read-Only Mode
Rich Text Editor can be configured via readOnly property thats defines whether RichTextEditor should be an active HTML editor, or a read-only document viewer.
Hello world!
Demo Code:
<p> <button class="btn btn-primary btn-wide transition-3d-hover mb-4 mb-sm-0 mr-3" onclick="toggle_readOnly()">Toggle ReadOnly</button> </p> <link rel="stylesheet" href="/richtexteditor/rte_theme_default.css" /> <script type="text/javascript" src="/richtexteditor/rte.js"></script> <script type="text/javascript" src='/richtexteditor/plugins/all_plugins.js'></script> <div id="div_editor1"> <p>Hello world!</p> <p><img src='/images/editor-image.png' /></p> </div> <script> var editor1 = new RichTextEditor("#div_editor1"); function toggle_readOnly() { if (editor1.getReadOnly()) editor1.setReadOnly(false); else editor1.setReadOnly(true); } </script>