@seorii/tiptap 0.0.4 → 0.0.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.
|
@@ -14,7 +14,7 @@ const san = (body, force = false) => (editor || force) ? body : sanitizeHtml(bod
|
|
|
14
14
|
'tiptap-file': ['id']
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
|
-
export let body = '', editor = false, style = '', ref = null,
|
|
17
|
+
export let body = '', editor = false, style = '', ref = null, options = {};
|
|
18
18
|
const tiptap = setContext('editor', writable(null));
|
|
19
19
|
let element, _body = san(body, true), fullscreen = false, html = false, mounted = false;
|
|
20
20
|
$: ref = $tiptap;
|
|
@@ -31,7 +31,7 @@ if (browser)
|
|
|
31
31
|
$tiptap = tt(element, _body, {
|
|
32
32
|
editable: editor,
|
|
33
33
|
onTransaction: () => $tiptap = $tiptap,
|
|
34
|
-
|
|
34
|
+
...options,
|
|
35
35
|
});
|
|
36
36
|
$tiptap.on('update', ({ editor: tiptap }) => {
|
|
37
37
|
let content = tiptap.getHTML(), json = tiptap.getJSON().content;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seorii/tiptap",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "svelte-kit sync && svelte-package",
|
|
@@ -64,7 +64,8 @@
|
|
|
64
64
|
".": {
|
|
65
65
|
"require": "./dist/index.js",
|
|
66
66
|
"import": "./dist/index.js",
|
|
67
|
-
"types": "./dist/index.d.ts"
|
|
67
|
+
"types": "./dist/index.d.ts",
|
|
68
|
+
"svelte": "./dist/index.js"
|
|
68
69
|
}
|
|
69
70
|
},
|
|
70
71
|
"license": "MIT",
|