All demos ↓← All 93 demos

Basic Example

Try a smaller toolbar with everyday writing tools.

Example code

<!--Include the JS & CSS-->
<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' alt='RichTextEditor screenshot' /></p>
</div>

<script>
    var editor1cfg = {}
    editor1cfg.toolbar = "basic";
    var editor1 = new RichTextEditor("#div_editor1", editor1cfg);

    // Square corners instead of the default rounded container.
    document.getElementById("div_editor1").classList.add("rte-square");
</script>

Customize Editor

This example uses the following code to create the editor instance.

    var editor1cfg = {}
    editor1cfg.toolbar = "basic";
    var editor1 = new RichTextEditor("#div_editor1", editor1cfg);

    // Square corners instead of the default rounded container.
    document.getElementById("div_editor1").classList.add("rte-square");

Basic toolbar definition(RTE_DefaultConfig.toolbar_small) can be found in rte.js.

If you want to reorder toolbar buttons or remove some of them, check the following link.

Toolbar Configuration

Use this in your app

This demo runs the same editor you get for every framework. See how to add it to yours: