tiptapify 0.0.1 → 0.0.2
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/README.md +4 -3
- package/components.d.ts +1 -1
- package/dist/tiptapify.css +1 -1
- package/dist/tiptapify.es.js +12317 -12287
- package/dist/tiptapify.umd.js +33 -33
- package/package.json +18 -5
- package/src/components/MenuBubble.vue +66 -24
- package/src/components/Tiptapify.vue +16 -6
- package/src/components/Toolbar/Index.vue +142 -0
- package/src/components/Toolbar/items.ts +588 -0
- package/src/components/editorExtensions.ts +58 -53
- package/src/composable/useEditor.ts +2 -2
- package/src/i18n/locales/en.json +8 -1
- package/src/i18n/locales/ru.json +8 -1
- package/src/i18n/locales/ua.json +8 -1
- package/src/components/Toolbar.vue +0 -651
|
@@ -4,12 +4,12 @@ import { editorExtensions } from '@tiptapify/components/editorExtensions'
|
|
|
4
4
|
|
|
5
5
|
let editorInstance: any = null
|
|
6
6
|
|
|
7
|
-
export function useEditor(content: any = '', placeholder: string = '') {
|
|
7
|
+
export function useEditor(content: any = '', placeholder: string = '', slashCommands: boolean = true) {
|
|
8
8
|
class TiptapifyEditor {
|
|
9
9
|
private editor
|
|
10
10
|
|
|
11
11
|
constructor() {
|
|
12
|
-
const extensions = editorExtensions(placeholder)
|
|
12
|
+
const extensions = editorExtensions(placeholder, slashCommands)
|
|
13
13
|
this.editor = useEditorOriginal({
|
|
14
14
|
content,
|
|
15
15
|
extensions,
|
package/src/i18n/locales/en.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"style": {
|
|
3
3
|
"heading": "heading",
|
|
4
|
+
"headings": {
|
|
5
|
+
"h1": "heading level 1",
|
|
6
|
+
"h2": "heading level 2",
|
|
7
|
+
"h3": "heading level 3",
|
|
8
|
+
"h4": "heading level 4",
|
|
9
|
+
"h5": "heading level 5",
|
|
10
|
+
"h6": "heading level 6"
|
|
11
|
+
},
|
|
4
12
|
"fontFamily": "font family",
|
|
5
13
|
"fontSize": "font size",
|
|
6
14
|
"lineHeight": "line height"
|
|
@@ -18,7 +26,6 @@
|
|
|
18
26
|
"blockquote": "cite",
|
|
19
27
|
"code": "code",
|
|
20
28
|
"codeblock": "code block",
|
|
21
|
-
"codeblock_syntax": "code block w/ syntax highlighting",
|
|
22
29
|
"link": "external link"
|
|
23
30
|
},
|
|
24
31
|
"action": {
|
package/src/i18n/locales/ru.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"style": {
|
|
3
3
|
"heading": "заголовок",
|
|
4
|
+
"headings": {
|
|
5
|
+
"h1": "заголовок 1-го уровня",
|
|
6
|
+
"h2": "заголовок 2-го уровня",
|
|
7
|
+
"h3": "заголовок 3-го уровня",
|
|
8
|
+
"h4": "заголовок 4-го уровня",
|
|
9
|
+
"h5": "заголовок 5-го уровня",
|
|
10
|
+
"h6": "заголовок 6-го уровня"
|
|
11
|
+
},
|
|
4
12
|
"fontFamily": "шрифт",
|
|
5
13
|
"fontSize": "размер",
|
|
6
14
|
"lineHeight": "высота строки"
|
|
@@ -18,7 +26,6 @@
|
|
|
18
26
|
"blockquote": "цитата",
|
|
19
27
|
"code": "код",
|
|
20
28
|
"codeblock": "блок кода",
|
|
21
|
-
"codeblock_syntax": "блок кода с подсветкой синтаксиса",
|
|
22
29
|
"link": "внешняя ссылка"
|
|
23
30
|
},
|
|
24
31
|
"action": {
|
package/src/i18n/locales/ua.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"style": {
|
|
3
3
|
"heading": "заголовок",
|
|
4
|
+
"headings": {
|
|
5
|
+
"h1": "заголовок 1-го рівня",
|
|
6
|
+
"h2": "заголовок 2-го рівня",
|
|
7
|
+
"h3": "заголовок 3-го рівня",
|
|
8
|
+
"h4": "заголовок 4-го рівня",
|
|
9
|
+
"h5": "заголовок 5-го рівня",
|
|
10
|
+
"h6": "заголовок 6-го рівня"
|
|
11
|
+
},
|
|
4
12
|
"fontFamily": "шрифт",
|
|
5
13
|
"fontSize": "розмір",
|
|
6
14
|
"lineHeight": "висота строки"
|
|
@@ -18,7 +26,6 @@
|
|
|
18
26
|
"blockquote": "цитата",
|
|
19
27
|
"code": "код",
|
|
20
28
|
"codeblock": "блок коду",
|
|
21
|
-
"codeblock_syntax": "блок коду з підсвіткою синтаксиса",
|
|
22
29
|
"link": "зовнішнє посилання"
|
|
23
30
|
},
|
|
24
31
|
"action": {
|