@lakamark/modulo-editor 0.2.0-alpha.1 → 0.2.0-alpha.2
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 +22 -4
- package/dist/modulo-editor.js +76 -770
- package/dist/modulo-editor.js.map +1 -1
- package/dist/modulo-editor.umd.cjs +1 -2
- package/dist/modulo-editor.umd.cjs.map +1 -1
- package/dist/types/core/Builder/DefaultModuloEditorBuilder.d.ts +31 -110
- package/dist/types/core/Builder/DefaultModuloEditorBuilder.d.ts.map +1 -1
- package/dist/types/core/ModuloEditor.d.ts.map +1 -1
- package/dist/types/core/contracts/ModuloEditorBuilder.d.ts +18 -18
- package/dist/types/core/contracts/ModuloEditorBuilder.d.ts.map +1 -1
- package/dist/types/presets/builtin/DefaultEditorPreset.d.ts +7 -0
- package/dist/types/presets/builtin/DefaultEditorPreset.d.ts.map +1 -0
- package/dist/types/presets/builtin/SafeMarkdownPreset.d.ts +7 -0
- package/dist/types/presets/builtin/SafeMarkdownPreset.d.ts.map +1 -0
- package/dist/types/presets/builtin/StarterKitPreset.d.ts +7 -0
- package/dist/types/presets/builtin/StarterKitPreset.d.ts.map +1 -0
- package/dist/types/presets/builtin/index.d.ts +4 -0
- package/dist/types/presets/builtin/index.d.ts.map +1 -0
- package/dist/types/presets/contracts/EditorPreset.d.ts +6 -0
- package/dist/types/presets/contracts/EditorPreset.d.ts.map +1 -0
- package/dist/types/presets/contracts/index.d.ts +2 -0
- package/dist/types/presets/contracts/index.d.ts.map +1 -0
- package/dist/types/presets/index.d.ts +3 -0
- package/dist/types/presets/index.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,6 +13,24 @@ Modular Markdown editor with plugins and textarea support.
|
|
|
13
13
|
- Toolbar extensions
|
|
14
14
|
- Command system
|
|
15
15
|
|
|
16
|
+
## Install
|
|
17
|
+
```bash
|
|
18
|
+
npm i @lakamark/modulo-editor
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick start
|
|
22
|
+
```ts
|
|
23
|
+
import { ModuloEditor } from "@lakamark/modulo-editor";
|
|
24
|
+
|
|
25
|
+
ModuloEditor
|
|
26
|
+
.create('[data-mo-editor]')
|
|
27
|
+
.withInput(inputAdapter)
|
|
28
|
+
.withOutput(outputAdapter)
|
|
29
|
+
.withMarkdown(markdownProcessor)
|
|
30
|
+
.build()
|
|
31
|
+
.init();
|
|
32
|
+
```
|
|
33
|
+
|
|
16
34
|
## HTML structure
|
|
17
35
|
```html
|
|
18
36
|
<div class="mo-editor" data-mo-editor>
|
|
@@ -20,19 +38,19 @@ Modular Markdown editor with plugins and textarea support.
|
|
|
20
38
|
<div class="mo-editor__header" data-mo-editor-header>
|
|
21
39
|
<div class="mo-editor__toolbar" data-mo-editor-toolbar></div>
|
|
22
40
|
</div>
|
|
23
|
-
|
|
41
|
+
|
|
24
42
|
<!-- Body editor -->
|
|
25
43
|
<div class="mo-editor__body" data-mo-editor-body>
|
|
26
44
|
<div class="mo-editor__input" data-mo-editor-input></div>
|
|
27
45
|
<div class="mo-editor__preview" data-mo-editor-preview></div>
|
|
28
46
|
</div>
|
|
29
|
-
|
|
47
|
+
|
|
30
48
|
<!-- Footer editor -->
|
|
31
49
|
<div class="mo-editor__footer" data-mo-editor-footer>
|
|
32
50
|
<div class="mo-editor__status" data-mo-editor-status></div>
|
|
33
51
|
</div>
|
|
34
|
-
|
|
35
|
-
<!-- Hidden textarea for
|
|
52
|
+
|
|
53
|
+
<!-- Hidden textarea for classic form submission -->
|
|
36
54
|
<textarea id="content" name="content" hidden data-mo-editor-textarea></textarea>
|
|
37
55
|
</div>
|
|
38
56
|
```
|