`@creaditor/texteditor` is a lightweight, customizable, and user-friendly text editor package designed to meet the needs of developers creating newsletters, email editors, or any application requiring rich text editing. It provides a variety of features a
npm install @creaditor/texteditor@creaditor/texteditor is a lightweight, customizable, and user-friendly text editor package designed to meet the needs of developers creating newsletters, email editors, or any application requiring rich text editing. It provides a variety of features and integrations with a focus on flexibility and usability.
- Rich Text Editing: Supports bold, italic, underline, strikethrough, and more.
- Direction Control: Handles both left-to-right (LTR) and right-to-left (RTL) text directions.
- Customizable Toolbars: Add or remove tools as needed to suit your requirements.
- Font and Style Management: Allows font family and size customization, text alignment, and color changes.
- LocalStorage Integration: Automatically saves the content to the browser's localStorage.
- Plugin Support: Easily extend functionality with custom plugins.
- Table Support: Add and customize tables directly in the editor.
- Emoji Picker: Built-in emoji selector for enhanced content creation.
Install the package via npm:
``bash`
npm install @creaditor/texteditor
#### Here’s a quick example to get started:
`js
import textEditor from "@creaditor/texteditor";
const root = document.createElement("div");
root.style.width = "500px";
root.style.marginTop = "300px";
const content = localStorage.getItem("cdtr-text-editor-demo");
const fontFamilies = [
{
id: "Arial",
cssRule: "Arial, Helvetica, sans-serif",
name: "Arial",
language: ["en", "he"],
url: null,
},
{
id: "Times New Roman",
cssRule: "Times New Roman, Times, Beskerville, Georgia, serif",
name: "Times New Roman",
language: ["en", "he"],
url: null,
},
{
id: "ArialV2",
cssRule: "Arial, Times, Beskerville, Georgia, serif",
name: "Arial test",
language: ["en", "he"],
url: null,
},
];
textEditor({
element: root,
editorWidth: "473px",
container: document.body,
editable: true,
content: content ? content : "
Hello
",## Key Integrations
##### This editor is built using:
• TipTap for ProseMirror-based rich text editing.
• Babel and Webpack for modern JavaScript development.
• PostCSS for managing CSS styles.
This package is licensed under the ISC License.