@thescaffold/editor-addons 0.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 +70 -0
- package/dist/index.cjs +4328 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +864 -0
- package/dist/index.d.ts +864 -0
- package/dist/index.mjs +4111 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# @thescaffold/editor-addons
|
|
2
|
+
|
|
3
|
+
Built-in addons for X Editor. Provides 80+ addons covering schema, marks, blocks, lists, tables, media, inline elements, UI shell, document structure, export, tools, collaboration, code mode, and utility features.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @thescaffold/editor-addons @thescaffold/editor-core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import "@thescaffold/editor-core/define";
|
|
15
|
+
import {
|
|
16
|
+
SchemaAddon,
|
|
17
|
+
CommandsAddon,
|
|
18
|
+
KeymapAddon,
|
|
19
|
+
HistoryAddon,
|
|
20
|
+
BoldAddon,
|
|
21
|
+
ItalicAddon,
|
|
22
|
+
HeadingsAddon,
|
|
23
|
+
ToolbarAddon,
|
|
24
|
+
StatusBarAddon,
|
|
25
|
+
PlaceholderAddon,
|
|
26
|
+
CountAddon,
|
|
27
|
+
} from "@thescaffold/editor-addons";
|
|
28
|
+
|
|
29
|
+
const el = document.querySelector("x-editor");
|
|
30
|
+
el.config = {
|
|
31
|
+
mode: "doc",
|
|
32
|
+
addons: [
|
|
33
|
+
SchemaAddon(),
|
|
34
|
+
CommandsAddon(),
|
|
35
|
+
KeymapAddon(),
|
|
36
|
+
HistoryAddon(),
|
|
37
|
+
BoldAddon(),
|
|
38
|
+
ItalicAddon(),
|
|
39
|
+
HeadingsAddon(),
|
|
40
|
+
ToolbarAddon({ position: "top" }),
|
|
41
|
+
StatusBarAddon({ slots: ["wordCount", "charCount"] }),
|
|
42
|
+
PlaceholderAddon({ text: "Start writing…" }),
|
|
43
|
+
CountAddon(),
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Addon Categories
|
|
49
|
+
|
|
50
|
+
| Category | Addons |
|
|
51
|
+
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
52
|
+
| Base | SchemaAddon, CommandsAddon, KeymapAddon, InputRulesAddon, HistoryAddon |
|
|
53
|
+
| Marks | BoldAddon, ItalicAddon, UnderlineAddon, StrikethroughAddon, InlineCodeAddon, SubscriptAddon, SuperscriptAddon, HighlightAddon, TextColorAddon, FontFamilyAddon, FontSizeAddon, ClearFormattingAddon |
|
|
54
|
+
| Formatting | AlignmentAddon, LineHeightAddon, ParagraphSpacingAddon, IndentAddon |
|
|
55
|
+
| Blocks | HeadingsAddon, BlockquoteAddon, DividerAddon, PageBreakAddon, CalloutAddon, DetailsAddon, ColumnsAddon, CodeBlockAddon |
|
|
56
|
+
| Lists | BulletListAddon, OrderedListAddon, TaskListAddon, ToggleListAddon, ListsAddon |
|
|
57
|
+
| Tables | TableAddon |
|
|
58
|
+
| Media | ImageAddon, VideoAddon, AudioAddon, FileAddon, EmbedAddon, BookmarkAddon |
|
|
59
|
+
| Inline | LinkAddon, MentionAddon, EmojiAddon, EquationAddon, FootnoteAddon, SmartChipAddon |
|
|
60
|
+
| UI Shell | ToolbarAddon, BubbleMenuAddon, SlashMenuAddon, CommandPaletteAddon, BlockHandlesAddon, ContextMenuAddon, StatusBarAddon |
|
|
61
|
+
| Structure | TableOfContentsAddon, OutlineAddon, CoverAddon, BreadcrumbAddon, TemplatesAddon, PageSetupAddon |
|
|
62
|
+
| Export | ContentAddon, DocxAddon, PdfAddon, PrintAddon |
|
|
63
|
+
| Tools | SearchAddon, SpellCheckAddon, GrammarAddon, AutoSaveAddon, ReadOnlyAddon |
|
|
64
|
+
| Collab | CollabAddon, AwarenessAddon, PresenceAddon, CommentsAddon, SuggestionsAddon, VersionAddon |
|
|
65
|
+
| Code | CodeAddon, LineNumbersAddon, CodeFoldingAddon, BracketMatchingAddon, CodeAutoCompleteAddon, CodeLintAddon, DiffAddon, MiniMapAddon |
|
|
66
|
+
| Utility | PlaceholderAddon, CountAddon, ReadingTimeAddon, FocusModeAddon, FullScreenAddon, AccessibilityAddon, MarkdownAddon |
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
MIT
|