@seorii/tiptap 0.2.21 → 0.3.0-next.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.
|
@@ -12,7 +12,7 @@ import { fallbackUpload } from '../plugin/image/dragdrop';
|
|
|
12
12
|
export let body = '', editable = false, mark = false, ref = null, options = {}, loaded = false;
|
|
13
13
|
export let imageUpload = fallbackUpload, style = '';
|
|
14
14
|
export let blocks = [], placeholder = i18n('placeholder');
|
|
15
|
-
export let
|
|
15
|
+
export let sanitize = {};
|
|
16
16
|
export let colors = [
|
|
17
17
|
'#ef5350', //red
|
|
18
18
|
'#ec407a', //pink
|
|
@@ -25,7 +25,8 @@ export let colors = [
|
|
|
25
25
|
];
|
|
26
26
|
export let bubbleOverride = false;
|
|
27
27
|
const san = (body) => sanitizeHtml(body, {
|
|
28
|
-
|
|
28
|
+
...sanitize,
|
|
29
|
+
allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img', 'math-inline', 'math-node', 'iframe', 'lite-youtube', 'blockquote', 'embed', 'mark', 'code', ...sanitize.allowedTags]),
|
|
29
30
|
allowedStyles: '*', allowedAttributes: {
|
|
30
31
|
'*': ['style', 'class'],
|
|
31
32
|
a: ['href', 'name', 'target'],
|
|
@@ -37,7 +38,7 @@ const san = (body) => sanitizeHtml(body, {
|
|
|
37
38
|
embed: ['src', 'type', 'frameborder', 'allowfullscreen'],
|
|
38
39
|
mark: ['style', 'data-color'],
|
|
39
40
|
code: ['class'],
|
|
40
|
-
...allowedAttributes
|
|
41
|
+
...sanitize.allowedAttributes
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
const tiptap = setContext('editor', writable(null));
|
|
@@ -13,8 +13,7 @@ declare const __propDef: {
|
|
|
13
13
|
style?: string | undefined;
|
|
14
14
|
blocks?: any[] | undefined;
|
|
15
15
|
placeholder?: any;
|
|
16
|
-
|
|
17
|
-
allowedAttributes?: any;
|
|
16
|
+
sanitize?: any;
|
|
18
17
|
colors?: string[] | undefined;
|
|
19
18
|
bubbleOverride?: boolean | undefined;
|
|
20
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seorii/tiptap",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-next.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "svelte-kit sync && svelte-package",
|
|
@@ -13,69 +13,71 @@
|
|
|
13
13
|
"page": "npm run build-page && node gh-pages.js"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@sveltejs/adapter-auto": "^3.
|
|
17
|
-
"@sveltejs/adapter-static": "^3.0.
|
|
18
|
-
"@sveltejs/kit": "^2.5.
|
|
19
|
-
"@sveltejs/package": "^2.3.
|
|
20
|
-
"@sveltejs/vite-plugin-svelte": "
|
|
21
|
-
"@tiptap/extension-code-block": "^2.
|
|
22
|
-
"@types/sanitize-html": "^2.
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
24
|
-
"@typescript-eslint/parser": "^
|
|
25
|
-
"eslint": "^
|
|
16
|
+
"@sveltejs/adapter-auto": "^3.2.4",
|
|
17
|
+
"@sveltejs/adapter-static": "^3.0.4",
|
|
18
|
+
"@sveltejs/kit": "^2.5.26",
|
|
19
|
+
"@sveltejs/package": "^2.3.4",
|
|
20
|
+
"@sveltejs/vite-plugin-svelte": "4.0.0-next.6",
|
|
21
|
+
"@tiptap/extension-code-block": "^2.6.6",
|
|
22
|
+
"@types/sanitize-html": "^2.13.0",
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "^8.4.0",
|
|
24
|
+
"@typescript-eslint/parser": "^8.4.0",
|
|
25
|
+
"eslint": "^9.10.0",
|
|
26
26
|
"eslint-config-prettier": "^9.1.0",
|
|
27
27
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
28
28
|
"gh-pages": "^6.1.1",
|
|
29
|
-
"highlight.js": "^11.
|
|
30
|
-
"prettier": "^3.
|
|
31
|
-
"prettier-plugin-svelte": "^3.2.
|
|
32
|
-
"sass": "^1.
|
|
33
|
-
"svelte": "
|
|
34
|
-
"svelte-check": "^
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"vite": "^5.2.2"
|
|
29
|
+
"highlight.js": "^11.10.0",
|
|
30
|
+
"prettier": "^3.3.3",
|
|
31
|
+
"prettier-plugin-svelte": "^3.2.6",
|
|
32
|
+
"sass": "^1.78.0",
|
|
33
|
+
"svelte": "next",
|
|
34
|
+
"svelte-check": "^4.0.1",
|
|
35
|
+
"tslib": "^2.7.0",
|
|
36
|
+
"typescript": "^5.5.4",
|
|
37
|
+
"vite": "^5.4.3"
|
|
39
38
|
},
|
|
40
39
|
"type": "module",
|
|
41
40
|
"dependencies": {
|
|
42
41
|
"@justinribeiro/lite-youtube": "^1.5.0",
|
|
43
42
|
"@seorii/prosemirror-math": "^0.4.2",
|
|
44
|
-
"@tiptap/core": "^2.
|
|
45
|
-
"@tiptap/extension-code": "^2.
|
|
46
|
-
"@tiptap/extension-code-block-lowlight": "^2.
|
|
47
|
-
"@tiptap/extension-color": "^2.
|
|
48
|
-
"@tiptap/extension-dropcursor": "^2.
|
|
49
|
-
"@tiptap/extension-highlight": "^2.
|
|
50
|
-
"@tiptap/extension-image": "^2.
|
|
51
|
-
"@tiptap/extension-link": "^2.
|
|
52
|
-
"@tiptap/extension-ordered-list": "^2.
|
|
53
|
-
"@tiptap/extension-placeholder": "^2.
|
|
54
|
-
"@tiptap/extension-subscript": "^2.
|
|
55
|
-
"@tiptap/extension-superscript": "^2.
|
|
56
|
-
"@tiptap/extension-table": "^2.
|
|
57
|
-
"@tiptap/extension-table-cell": "^2.
|
|
58
|
-
"@tiptap/extension-table-header": "^2.
|
|
59
|
-
"@tiptap/extension-table-row": "^2.
|
|
60
|
-
"@tiptap/extension-text-align": "^2.
|
|
61
|
-
"@tiptap/extension-text-style": "^2.
|
|
62
|
-
"@tiptap/extension-underline": "^2.
|
|
63
|
-
"@tiptap/
|
|
64
|
-
"@tiptap/
|
|
65
|
-
"@tiptap/
|
|
43
|
+
"@tiptap/core": "^2.6.6",
|
|
44
|
+
"@tiptap/extension-code": "^2.6.6",
|
|
45
|
+
"@tiptap/extension-code-block-lowlight": "^2.6.6",
|
|
46
|
+
"@tiptap/extension-color": "^2.6.6",
|
|
47
|
+
"@tiptap/extension-dropcursor": "^2.6.6",
|
|
48
|
+
"@tiptap/extension-highlight": "^2.6.6",
|
|
49
|
+
"@tiptap/extension-image": "^2.6.6",
|
|
50
|
+
"@tiptap/extension-link": "^2.6.6",
|
|
51
|
+
"@tiptap/extension-ordered-list": "^2.6.6",
|
|
52
|
+
"@tiptap/extension-placeholder": "^2.6.6",
|
|
53
|
+
"@tiptap/extension-subscript": "^2.6.6",
|
|
54
|
+
"@tiptap/extension-superscript": "^2.6.6",
|
|
55
|
+
"@tiptap/extension-table": "^2.6.6",
|
|
56
|
+
"@tiptap/extension-table-cell": "^2.6.6",
|
|
57
|
+
"@tiptap/extension-table-header": "^2.6.6",
|
|
58
|
+
"@tiptap/extension-table-row": "^2.6.6",
|
|
59
|
+
"@tiptap/extension-text-align": "^2.6.6",
|
|
60
|
+
"@tiptap/extension-text-style": "^2.6.6",
|
|
61
|
+
"@tiptap/extension-underline": "^2.6.6",
|
|
62
|
+
"@tiptap/html": "^2.6.6",
|
|
63
|
+
"@tiptap/pm": "^2.6.6",
|
|
64
|
+
"@tiptap/starter-kit": "^2.6.6",
|
|
65
|
+
"@tiptap/suggestion": "^2.6.6",
|
|
66
66
|
"emojis-keywords": "2.0.0",
|
|
67
67
|
"emojis-list": "3.0.0",
|
|
68
|
+
"flourite": "^1.3.0",
|
|
68
69
|
"lowlight": "^3.1.0",
|
|
69
|
-
"nunui": "
|
|
70
|
-
"prosemirror-commands": "^1.
|
|
71
|
-
"prosemirror-model": "^1.
|
|
70
|
+
"nunui": "2.0.0-next.13",
|
|
71
|
+
"prosemirror-commands": "^1.6.0",
|
|
72
|
+
"prosemirror-model": "^1.22.3",
|
|
72
73
|
"prosemirror-state": "^1.4.3",
|
|
73
|
-
"prosemirror-tables": "^1.
|
|
74
|
-
"prosemirror-transform": "^1.
|
|
75
|
-
"prosemirror-view": "^1.
|
|
76
|
-
"sanitize-html": "^2.
|
|
77
|
-
"
|
|
78
|
-
"svelte-
|
|
74
|
+
"prosemirror-tables": "^1.5.0",
|
|
75
|
+
"prosemirror-transform": "^1.10.0",
|
|
76
|
+
"prosemirror-view": "^1.34.2",
|
|
77
|
+
"sanitize-html": "^2.13.0",
|
|
78
|
+
"shiki": "^1.16.2",
|
|
79
|
+
"svelte-awesome-color-picker": "^3.1.4",
|
|
80
|
+
"svelte-tiptap": "^1.1.3",
|
|
79
81
|
"tippy.js": "^6.3.7"
|
|
80
82
|
},
|
|
81
83
|
"exports": {
|