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.
import { createRichTextEditor } from "ts-rich-text-editor";
const editor = await createRichTextEditor("#div_editor1", {
tabSpaces: " ",
}, {
basePath: "/richtexteditor",
});
enterKeyTag = "p";