editate 0.6.26 → 0.6.27
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 +3 -2
- package/lib/doc/types.d.ts +2 -0
- package/lib/index.cjs.map +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,8 +37,8 @@ Both desktop and mobile browsers that support [beforeinput event](https://develo
|
|
|
37
37
|
2. Define your editor view declaratively. There are rules you have to follow:
|
|
38
38
|
- You must render all texts in the document as Text nodes in DOM.
|
|
39
39
|
- You must render `<br/>` in empty blocks (limitation of contenteditable).
|
|
40
|
-
- You must render hard breaks in the document as [block element](https://github.com/inokawa/editate/blob/
|
|
41
|
-
- You must render void nodes in the document as [void element](https://github.com/inokawa/editate/blob/
|
|
40
|
+
- You must render hard breaks in the document as [block element](https://github.com/inokawa/editate/blob/e466e941bd0bd4fd3f668ca365cd076f1cb333a2/src/dom/default.ts#L26).
|
|
41
|
+
- You must render void nodes in the document as [void element](https://github.com/inokawa/editate/blob/e466e941bd0bd4fd3f668ca365cd076f1cb333a2/src/dom/parser.ts#L174-L188).
|
|
42
42
|
3. Use `createPlainEditor`/`createEditor` to initialize `Editor` with the document.
|
|
43
43
|
4. Call `Editor.input` on mount, with `HTMLElement` which is the root of editor view.
|
|
44
44
|
5. Update your state with `onChange`, which will be called on edit.
|
|
@@ -247,6 +247,7 @@ If you find a problem, feel free to create an [issue](https://github.com/inokawa
|
|
|
247
247
|
- [Lexical](https://github.com/facebook/lexical)
|
|
248
248
|
- [Quill](https://github.com/slab/quill)
|
|
249
249
|
- [Tiptap](https://github.com/ueberdosis/tiptap)
|
|
250
|
+
- [Wordgard](https://wordgard.net/)
|
|
250
251
|
- [Draft.js](https://github.com/facebookarchive/draft-js)
|
|
251
252
|
- [rich-textarea](https://github.com/inokawa/rich-textarea) (my early project)
|
|
252
253
|
- [use-editable](https://github.com/FormidableLabs/use-editable)
|