@ctzhian/tiptap 2.1.3 → 2.1.4
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/hook/index.js +1 -8
- package/package.json +1 -1
package/dist/hook/index.js
CHANGED
|
@@ -10,7 +10,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
import { getExtensions } from "../extension";
|
|
11
11
|
import { migrateMathStrings } from '@tiptap/extension-mathematics';
|
|
12
12
|
import { useEditor } from '@tiptap/react';
|
|
13
|
-
import { renderToMarkdown } from '@tiptap/static-renderer/pm/markdown';
|
|
14
13
|
var useTiptap = function useTiptap(_ref) {
|
|
15
14
|
var exclude = _ref.exclude,
|
|
16
15
|
extensionsProps = _ref.extensions,
|
|
@@ -119,13 +118,7 @@ var useTiptap = function useTiptap(_ref) {
|
|
|
119
118
|
},
|
|
120
119
|
getMarkdown: function getMarkdown() {
|
|
121
120
|
if (!editor) return '';
|
|
122
|
-
|
|
123
|
-
return editor.getMarkdown();
|
|
124
|
-
}
|
|
125
|
-
return renderToMarkdown({
|
|
126
|
-
extensions: editor.extensionManager.extensions,
|
|
127
|
-
content: editor.getJSON()
|
|
128
|
-
});
|
|
121
|
+
return editor.getMarkdown();
|
|
129
122
|
},
|
|
130
123
|
getText: function getText() {
|
|
131
124
|
return (editor === null || editor === void 0 ? void 0 : editor.getText()) || '';
|