RichTextEditor Demo
Home Pricing

## Set up tab spaces

The tabSpaces Property allows you set the number of spaces to be inserted when the Tab key is pressed. When tabSpaces is set to `null`,`<span style="white-space:pre"> </span>` will be inserted.

This demo shows how to customize the width of tab characters. Three tab spaces are used when the Tab key is pressed within the editor.

### Demo Code:

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

    const editor = await createRichTextEditor("#div_editor1", {
      tabSpaces: "&nbsp;&nbsp;&nbsp;",
    }, {
      basePath: "/richtexteditor",
    });

    enterKeyTag = "p";