Examples

Custom Toolbar

RichTextEditor makes it easy to customize toolbar layout. You can add or remove buttons, reorganize groups, and define your own toolbar presets or custom tools.

This example shows how to define a custom toolbar preset.

Example code

<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 shows how to define a custom toolbar preset.</p>
</div>

<script>
	var editor1cfg = {}
	editor1cfg.toolbar = "mytoolbar";
	editor1cfg.toolbar_mytoolbar = "{bold,italic}|{fontname,fontsize}|{forecolor,backcolor}|removeformat"
		+ "#{undo,redo,fullscreenenter,fullscreenexit,togglemore}";
	var editor1 = new RichTextEditor("#div_editor1", editor1cfg);
</script>