@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 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 a classic form submitted -->
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
  ```