nam-rich-text-editor 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # Rich Text Editor
2
+
3
+ A custom rich text editor similar to Word, built with JavaScript and TypeScript. The content is stored as HTML.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install rich-text-editor
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```javascript
14
+ import { RichTextEditor } from "rich-text-editor";
15
+
16
+ const editor = new RichTextEditor("editor-container");
17
+
18
+ // Get HTML content
19
+ const html = editor.getHTML();
20
+
21
+ // Set HTML content
22
+ editor.setHTML("<p>Hello <strong>world</strong>!</p>");
23
+ ```
24
+
25
+ Add a div with id 'editor-container' in your HTML:
26
+
27
+ ```html
28
+ <div id="editor-container"></div>
29
+ ```
30
+
31
+ ## Features
32
+
33
+ - Bold, Italic, Underline formatting
34
+ - Bullet and numbered lists
35
+ - HTML content editing
36
+
37
+ ## Development
38
+
39
+ ```bash
40
+ npm run dev # Start development server
41
+ npm run build # Build for production
42
+ ```
@@ -0,0 +1 @@
1
+ export declare function createEditor(_onImageInsert: () => void, onImageToggle: (el: HTMLElement) => void): HTMLElement;
@@ -0,0 +1,2 @@
1
+ export declare function insertImage(editor: HTMLElement): void;
2
+ export declare function toggleImageResize(target: HTMLElement): void;
@@ -0,0 +1,8 @@
1
+ export declare class RichTextEditor {
2
+ private container;
3
+ private toolbar;
4
+ private editor;
5
+ constructor(containerId: string);
6
+ getHTML(): string;
7
+ setHTML(html: string): void;
8
+ }
@@ -0,0 +1 @@
1
+ export declare function createToolbar(): HTMLElement;
@@ -0,0 +1 @@
1
+ export { RichTextEditor } from "./RichTextEditor";
package/dist/main.d.ts ADDED
@@ -0,0 +1 @@
1
+ import "./style.css";