tiptap-markdown-react 0.14.3 → 0.14.5

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/dist/index.js CHANGED
@@ -1882,23 +1882,6 @@ function MarkdownPreview({
1882
1882
  },
1883
1883
  [extensions]
1884
1884
  );
1885
- useEffect(() => {
1886
- if (!editor) return;
1887
- const strip = () => {
1888
- const { doc, tr } = editor.state;
1889
- const last = doc.lastChild;
1890
- if (doc.childCount > 1 && (last == null ? void 0 : last.type.name) === "paragraph" && last.content.size === 0) {
1891
- editor.view.dispatch(
1892
- tr.delete(doc.content.size - last.nodeSize, doc.content.size)
1893
- );
1894
- }
1895
- };
1896
- strip();
1897
- editor.on("update", strip);
1898
- return () => {
1899
- editor.off("update", strip);
1900
- };
1901
- }, [editor]);
1902
1885
  useEffect(() => {
1903
1886
  if (!editor) return;
1904
1887
  editor.commands.setContent(prepared, { contentType: "markdown" });