mdwysiwyg 0.2.0 → 0.2.1

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
@@ -13,7 +13,7 @@ import { TextSelection } from "@tiptap/pm/state";
13
13
  // src/components/MarkdownEditor/markdown/tiptapMarkdownBridge.ts
14
14
  import { Node } from "@tiptap/core";
15
15
  import StarterKit from "@tiptap/starter-kit";
16
- import Table from "@tiptap/extension-table";
16
+ import { Table } from "@tiptap/extension-table";
17
17
  import TableRow from "@tiptap/extension-table-row";
18
18
  import TableCell from "@tiptap/extension-table-cell";
19
19
  import TableHeader from "@tiptap/extension-table-header";
@@ -4115,10 +4115,9 @@ var MarkdownEditor = forwardRef2(function MarkdownEditor2({
4115
4115
  });
4116
4116
  } else {
4117
4117
  const offset = textareaRef.current?.selectionStart ?? 0;
4118
- editor?.commands.setContent(
4119
- markdownToEditorContent(sourceRef.current),
4120
- false
4121
- );
4118
+ editor?.commands.setContent(markdownToEditorContent(sourceRef.current), {
4119
+ emitUpdate: false
4120
+ });
4122
4121
  setViewMode("wysiwyg");
4123
4122
  if (editor !== null) {
4124
4123
  const pos = markdownOffsetToProseMirrorPos(
@@ -4143,7 +4142,9 @@ var MarkdownEditor = forwardRef2(function MarkdownEditor2({
4143
4142
  const original = originalContentRef.current;
4144
4143
  sourceRef.current = original;
4145
4144
  setSource(original);
4146
- editor?.commands.setContent(markdownToEditorContent(original), false);
4145
+ editor?.commands.setContent(markdownToEditorContent(original), {
4146
+ emitUpdate: false
4147
+ });
4147
4148
  },
4148
4149
  isModified() {
4149
4150
  return sourceRef.current !== originalContentRef.current;