RichTextEditor Demo
Home Pricing

### Built-In Plugins

RichTextEditor supports plugins. You can use built-in plugins or build your own. Plugins call APIs to communicate with the editor. When an operation is performed by the user or when content is changed by code, the editor will trigger events for the plugins to handle.

This example demonstrates 5 built-in plugins.

### Demo Code:

    import { createRichTextEditor } from "ts-rich-text-editor";

    const editor = await createRichTextEditor("#div_editor1", {
      toolbar: "mytoolbar",
      toolbarMobile: "mytoolbar",
      toolbar_mytoolbar: "{html2pdf,insertemoji,insertcode,insertgallery,inserttemplate}",
    }, {
      basePath: "/richtexteditor",
    });

    <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>This example demonstrates 5 built-in plugins.</p>
    </div>
    <script>
    	var editor1cfg = {}
    	editor1cfg.toolbar = editor1cfg.toolbarMobile = "mytoolbar";
    	editor1cfg.toolbar_mytoolbar = "{html2pdf,insertemoji,insertcode,insertgallery,inserttemplate}";
    	var editor1 = new RichTextEditor("#div_editor1", editor1cfg);
    </script>

### Relative Links

- Use JavaScript API