mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 22:36:14 +08:00
369f109fc7
* Refactor: extract `setRenderer` and `removeRenderer` methods * Refactor: avoid using a mutable ES6 Map in React component state The React docs recommend treating the `state` as immutable. See e.g.: https://reactjs.org/docs/react-component.html#state * Fix: flush EditorContent state changes immediately once initialized This fixes the cursor problem described in tiptap#3200 Node views need to be rendered immediately when they're created so that the editor can correctly position the cursor. That's achieved using `flushSync` whenever a new node view renderer is added. However, `flushSync` cannot be used from inside a React component lifecycle method. By keeping an instance variable to determine if initialization has happened, we can avoid using `flushSync` from inside the `componentDidMount` and `componentDidUpdate` methods, and still call it whenever a new node view is created afterwards. |
||
---|---|---|
.. | ||
core | ||
extension-blockquote | ||
extension-bold | ||
extension-bubble-menu | ||
extension-bullet-list | ||
extension-character-count | ||
extension-code | ||
extension-code-block | ||
extension-code-block-lowlight | ||
extension-collaboration | ||
extension-collaboration-cursor | ||
extension-color | ||
extension-document | ||
extension-dropcursor | ||
extension-floating-menu | ||
extension-focus | ||
extension-font-family | ||
extension-gapcursor | ||
extension-hard-break | ||
extension-heading | ||
extension-highlight | ||
extension-history | ||
extension-horizontal-rule | ||
extension-image | ||
extension-italic | ||
extension-link | ||
extension-list-item | ||
extension-mention | ||
extension-ordered-list | ||
extension-paragraph | ||
extension-placeholder | ||
extension-strike | ||
extension-subscript | ||
extension-superscript | ||
extension-table | ||
extension-table-cell | ||
extension-table-header | ||
extension-table-row | ||
extension-task-item | ||
extension-task-list | ||
extension-text | ||
extension-text-align | ||
extension-text-style | ||
extension-typography | ||
extension-underline | ||
extension-youtube | ||
html | ||
react | ||
starter-kit | ||
suggestion | ||
vue-2 | ||
vue-3 |