tiptapify 0.0.5 → 0.0.7
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 +7 -1
- package/dist/tiptapify.css +1 -1
- package/dist/{tiptapify.es.js → tiptapify.mjs} +52867 -51790
- package/dist/tiptapify.umd.js +41 -43
- package/package.json +8 -8
- package/src/components/Footer.vue +5 -6
- package/src/components/MenuBubble.vue +61 -47
- package/src/components/MenuFloating.vue +38 -34
- package/src/components/Tiptapify.vue +139 -23
- package/src/components/Toolbar/Group.vue +43 -0
- package/src/components/Toolbar/GroupDropdown.vue +85 -0
- package/src/components/Toolbar/Index.vue +51 -79
- package/src/components/Toolbar/Toggle.vue +33 -0
- package/src/components/Toolbar/items/actions.ts +32 -0
- package/src/components/Toolbar/items/alignment.ts +60 -0
- package/src/components/Toolbar/items/format.ts +73 -0
- package/src/components/Toolbar/items/formatExtra.ts +73 -0
- package/src/components/Toolbar/items/list.ts +70 -0
- package/src/components/Toolbar/items/media.ts +202 -0
- package/src/components/Toolbar/items/misc.ts +59 -0
- package/src/components/Toolbar/items/style.ts +146 -0
- package/src/components/Toolbar/items.ts +73 -545
- package/src/components/editorExtensions.ts +6 -4
- package/src/components/index.ts +13 -0
- package/src/{components/extensions → extensions}/components/LinkDialog.vue +11 -8
- package/src/extensions/components/PreviewDialog.vue +45 -0
- package/src/{components/extensions/components/ShowSource.vue → extensions/components/ShowSourceDialog.vue} +11 -7
- package/src/extensions/components/TableBuilder.vue +138 -0
- package/src/extensions/preview.ts +53 -0
- package/src/{components/extensions → extensions}/view-source.ts +1 -3
- package/src/i18n/locales/de.json +64 -45
- package/src/i18n/locales/en.json +21 -2
- package/src/i18n/locales/es.json +27 -8
- package/src/i18n/locales/fr.json +26 -7
- package/src/i18n/locales/it.json +36 -17
- package/src/i18n/locales/pl.json +28 -9
- package/src/i18n/locales/ru.json +21 -2
- package/src/i18n/locales/ua.json +21 -2
- package/src/utils/helpers.ts +17 -0
- package/src/composable/useEditor.ts +0 -35
- /package/src/{components/extensions → extensions}/components/slashCommands/CommandsList.vue +0 -0
- /package/src/{components/extensions → extensions}/components/slashCommands/suggestion.ts +0 -0
- /package/src/{components/extensions → extensions}/slash-commands.ts +0 -0
package/src/i18n/locales/it.json
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"h5": "intestazione livello 5",
|
|
11
11
|
"h6": "intestazione livello 6"
|
|
12
12
|
},
|
|
13
|
-
"fontFamily": "famiglia
|
|
14
|
-
"fontSize": "dimensione
|
|
15
|
-
"lineHeight": "
|
|
13
|
+
"fontFamily": "famiglia di caratteri",
|
|
14
|
+
"fontSize": "dimensione carattere",
|
|
15
|
+
"lineHeight": "altezza di riga"
|
|
16
16
|
},
|
|
17
17
|
"format": {
|
|
18
18
|
"bold": "grassetto",
|
|
@@ -22,46 +22,65 @@
|
|
|
22
22
|
"sup": "apice",
|
|
23
23
|
"sub": "pedice",
|
|
24
24
|
"break": "interruzione di riga",
|
|
25
|
-
"highlight": "
|
|
25
|
+
"highlight": "evidenzia",
|
|
26
26
|
"line": "linea orizzontale",
|
|
27
27
|
"blockquote": "citazione",
|
|
28
28
|
"code": "codice",
|
|
29
29
|
"codeblock": "blocco di codice",
|
|
30
|
-
"link": "
|
|
31
|
-
"formatClear": "cancella
|
|
30
|
+
"link": "collegamento esterno",
|
|
31
|
+
"formatClear": "cancella formato",
|
|
32
|
+
"tables": {
|
|
33
|
+
"table": "tabella",
|
|
34
|
+
"insertTable": "inserisci tabella",
|
|
35
|
+
"deleteTable": "elimina tabella",
|
|
36
|
+
"insertWithHeaderRow": "inserisci tabella con riga di intestazione",
|
|
37
|
+
"rows": "righe",
|
|
38
|
+
"row": "riga",
|
|
39
|
+
"insertRowBefore": "inserisci riga prima",
|
|
40
|
+
"insertRowAfter": "inserisci riga dopo",
|
|
41
|
+
"deleteRow": "elimina riga",
|
|
42
|
+
"cols": "colonne",
|
|
43
|
+
"col": "colonna",
|
|
44
|
+
"insertColBefore": "inserisci colonna prima",
|
|
45
|
+
"insertColAfter": "inserisci colonna dopo",
|
|
46
|
+
"deleteCol": "elimina colonna",
|
|
47
|
+
"mergeCells": "unisci celle",
|
|
48
|
+
"splitCell": "dividi cella"
|
|
49
|
+
}
|
|
32
50
|
},
|
|
33
51
|
"action": {
|
|
34
52
|
"undo": "annulla",
|
|
35
|
-
"redo": "
|
|
53
|
+
"redo": "ripristina"
|
|
36
54
|
},
|
|
37
55
|
"alignment": "allineamento",
|
|
38
56
|
"alignments": {
|
|
39
57
|
"left": "allinea a sinistra",
|
|
40
|
-
"center": "
|
|
58
|
+
"center": "centra",
|
|
41
59
|
"right": "allinea a destra",
|
|
42
60
|
"justify": "giustifica"
|
|
43
61
|
},
|
|
44
|
-
"list": "
|
|
62
|
+
"list": "elenco",
|
|
45
63
|
"lists": {
|
|
46
|
-
"bullet": "
|
|
47
|
-
"numbered": "
|
|
48
|
-
"task": "
|
|
49
|
-
"indent": "
|
|
64
|
+
"bullet": "elenco puntato",
|
|
65
|
+
"numbered": "elenco numerato",
|
|
66
|
+
"task": "elenco attività",
|
|
67
|
+
"indent": "rientro elemento",
|
|
50
68
|
"outdent": "riduci rientro"
|
|
51
69
|
},
|
|
52
70
|
"dialog": {
|
|
53
71
|
"close": "chiudi",
|
|
54
72
|
"apply": "applica",
|
|
55
73
|
"link": {
|
|
56
|
-
"title": "aggiungi/modifica
|
|
57
|
-
"placeholder": "indirizzo del
|
|
74
|
+
"title": "aggiungi/modifica collegamento",
|
|
75
|
+
"placeholder": "indirizzo del collegamento"
|
|
58
76
|
},
|
|
59
77
|
"source": {
|
|
60
78
|
"title": "visualizza codice sorgente",
|
|
61
|
-
"prettify": "
|
|
79
|
+
"prettify": "abbellisci"
|
|
62
80
|
}
|
|
63
81
|
},
|
|
64
82
|
"misc": {
|
|
65
|
-
"source": "visualizza codice sorgente"
|
|
83
|
+
"source": "visualizza codice sorgente",
|
|
84
|
+
"preview": "anteprima"
|
|
66
85
|
}
|
|
67
86
|
}
|
package/src/i18n/locales/pl.json
CHANGED
|
@@ -21,18 +21,36 @@
|
|
|
21
21
|
"underline": "podkreślenie",
|
|
22
22
|
"sup": "indeks górny",
|
|
23
23
|
"sub": "indeks dolny",
|
|
24
|
-
"break": "
|
|
25
|
-
"highlight": "
|
|
24
|
+
"break": "łamanie linii",
|
|
25
|
+
"highlight": "podświetlenie",
|
|
26
26
|
"line": "linia pozioma",
|
|
27
27
|
"blockquote": "cytat",
|
|
28
28
|
"code": "kod",
|
|
29
29
|
"codeblock": "blok kodu",
|
|
30
30
|
"link": "link zewnętrzny",
|
|
31
|
-
"formatClear": "wyczyść formatowanie"
|
|
31
|
+
"formatClear": "wyczyść formatowanie",
|
|
32
|
+
"tables": {
|
|
33
|
+
"table": "tabela",
|
|
34
|
+
"insertTable": "wstaw tabelę",
|
|
35
|
+
"deleteTable": "usuń tabelę",
|
|
36
|
+
"insertWithHeaderRow": "wstaw tabelę z wierszem nagłówka",
|
|
37
|
+
"rows": "wiersze",
|
|
38
|
+
"row": "wiersz",
|
|
39
|
+
"insertRowBefore": "wstaw wiersz przed",
|
|
40
|
+
"insertRowAfter": "wstaw wiersz po",
|
|
41
|
+
"deleteRow": "usuń wiersz",
|
|
42
|
+
"cols": "kolumny",
|
|
43
|
+
"col": "kolumna",
|
|
44
|
+
"insertColBefore": "wstaw kolumnę przed",
|
|
45
|
+
"insertColAfter": "wstaw kolumnę po",
|
|
46
|
+
"deleteCol": "usuń kolumnę",
|
|
47
|
+
"mergeCells": "połącz komórki",
|
|
48
|
+
"splitCell": "podziel komórkę"
|
|
49
|
+
}
|
|
32
50
|
},
|
|
33
51
|
"action": {
|
|
34
52
|
"undo": "cofnij",
|
|
35
|
-
"redo": "
|
|
53
|
+
"redo": "ponów"
|
|
36
54
|
},
|
|
37
55
|
"alignment": "wyrównanie",
|
|
38
56
|
"alignments": {
|
|
@@ -43,10 +61,10 @@
|
|
|
43
61
|
},
|
|
44
62
|
"list": "lista",
|
|
45
63
|
"lists": {
|
|
46
|
-
"bullet": "lista
|
|
64
|
+
"bullet": "lista punktowana",
|
|
47
65
|
"numbered": "lista numerowana",
|
|
48
66
|
"task": "lista zadań",
|
|
49
|
-
"indent": "
|
|
67
|
+
"indent": "wcięcie elementu",
|
|
50
68
|
"outdent": "zmniejsz wcięcie"
|
|
51
69
|
},
|
|
52
70
|
"dialog": {
|
|
@@ -57,11 +75,12 @@
|
|
|
57
75
|
"placeholder": "adres linku"
|
|
58
76
|
},
|
|
59
77
|
"source": {
|
|
60
|
-
"title": "
|
|
61
|
-
"prettify": "
|
|
78
|
+
"title": "wyświetl kod źródłowy",
|
|
79
|
+
"prettify": "sformatuj"
|
|
62
80
|
}
|
|
63
81
|
},
|
|
64
82
|
"misc": {
|
|
65
|
-
"source": "
|
|
83
|
+
"source": "wyświetl kod źródłowy",
|
|
84
|
+
"preview": "podgląd"
|
|
66
85
|
}
|
|
67
86
|
}
|
package/src/i18n/locales/ru.json
CHANGED
|
@@ -28,7 +28,25 @@
|
|
|
28
28
|
"code": "код",
|
|
29
29
|
"codeblock": "блок кода",
|
|
30
30
|
"link": "внешняя ссылка",
|
|
31
|
-
"formatClear": "очистить форматирование"
|
|
31
|
+
"formatClear": "очистить форматирование",
|
|
32
|
+
"tables": {
|
|
33
|
+
"table": "таблица",
|
|
34
|
+
"insertTable": "вставить таблицу",
|
|
35
|
+
"deleteTable": "удалить таблицу",
|
|
36
|
+
"insertWithHeaderRow": "вставить таблицу с заголовком",
|
|
37
|
+
"rows": "строки",
|
|
38
|
+
"row": "строка",
|
|
39
|
+
"insertRowBefore": "вставить строку перед",
|
|
40
|
+
"insertRowAfter": "вставить строку после",
|
|
41
|
+
"deleteRow": "удалить строку",
|
|
42
|
+
"cols": "столбцы",
|
|
43
|
+
"col": "столбец",
|
|
44
|
+
"insertColBefore": "вставить колонку перед",
|
|
45
|
+
"insertColAfter": "вставить колонку после",
|
|
46
|
+
"deleteCol": "удалить колонку",
|
|
47
|
+
"mergeCells": "объединить ячейки",
|
|
48
|
+
"splitCell": "разделить ячейку"
|
|
49
|
+
}
|
|
32
50
|
},
|
|
33
51
|
"action": {
|
|
34
52
|
"undo": "отмена",
|
|
@@ -62,6 +80,7 @@
|
|
|
62
80
|
}
|
|
63
81
|
},
|
|
64
82
|
"misc": {
|
|
65
|
-
"source": "просмотр исходного кода"
|
|
83
|
+
"source": "просмотр исходного кода",
|
|
84
|
+
"preview": "предпросмотр"
|
|
66
85
|
}
|
|
67
86
|
}
|
package/src/i18n/locales/ua.json
CHANGED
|
@@ -28,7 +28,25 @@
|
|
|
28
28
|
"code": "код",
|
|
29
29
|
"codeblock": "блок коду",
|
|
30
30
|
"link": "зовнішнє посилання",
|
|
31
|
-
"formatClear": "очистити форматування"
|
|
31
|
+
"formatClear": "очистити форматування",
|
|
32
|
+
"tables": {
|
|
33
|
+
"table": "таблиця",
|
|
34
|
+
"insertTable": "вставити таблицю",
|
|
35
|
+
"deleteTable": "видалити таблицю",
|
|
36
|
+
"insertWithHeaderRow": "вставити таблицю із заголовком",
|
|
37
|
+
"rows": "строки",
|
|
38
|
+
"row": "строка",
|
|
39
|
+
"insertRowBefore": "вставити строку перед",
|
|
40
|
+
"insertRowAfter": "вставити строку після",
|
|
41
|
+
"deleteRow": "видалити строку",
|
|
42
|
+
"cols": "стовпчики",
|
|
43
|
+
"col": "стовпчик",
|
|
44
|
+
"insertColBefore": "вставити колонку перед",
|
|
45
|
+
"insertColAfter": "вставити колонку після",
|
|
46
|
+
"deleteCol": "видалити колонку",
|
|
47
|
+
"mergeCells": "об'єднати клітинки",
|
|
48
|
+
"splitCell": "розділити клітинки"
|
|
49
|
+
}
|
|
32
50
|
},
|
|
33
51
|
"action": {
|
|
34
52
|
"undo": "відміна",
|
|
@@ -62,6 +80,7 @@
|
|
|
62
80
|
}
|
|
63
81
|
},
|
|
64
82
|
"misc": {
|
|
65
|
-
"source": "перегляд вихідного коду"
|
|
83
|
+
"source": "перегляд вихідного коду",
|
|
84
|
+
"preview": "попередній перегляд"
|
|
66
85
|
}
|
|
67
86
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
ucFirst: (string: String, snakeCaseToWords: Boolean = false, kebabCaseToWords: Boolean = false): String|any => {
|
|
3
|
+
if (!string) {
|
|
4
|
+
return string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
if (snakeCaseToWords) {
|
|
8
|
+
string = string.replaceAll('_', ' ')
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (kebabCaseToWords) {
|
|
12
|
+
string = string.replaceAll('-', ' ')
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return string[0].toUpperCase() + string.slice(1)
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { useEditor as useEditorOriginal } from '@tiptap/vue-3'
|
|
2
|
-
|
|
3
|
-
import { editorExtensions } from '@tiptapify/components/editorExtensions'
|
|
4
|
-
|
|
5
|
-
let editorInstance: any = null
|
|
6
|
-
|
|
7
|
-
export function useEditor(content: any = '', placeholder: string = '', slashCommands: boolean = true) {
|
|
8
|
-
class TiptapifyEditor {
|
|
9
|
-
private editor
|
|
10
|
-
|
|
11
|
-
constructor() {
|
|
12
|
-
const extensions = editorExtensions(placeholder, slashCommands)
|
|
13
|
-
this.editor = useEditorOriginal({
|
|
14
|
-
content,
|
|
15
|
-
extensions,
|
|
16
|
-
})
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
getInstance() {
|
|
20
|
-
return this.editor
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
destroy() {
|
|
24
|
-
this.editor.value.destroy()
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (!editorInstance) {
|
|
29
|
-
editorInstance = new TiptapifyEditor()
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return {
|
|
33
|
-
editor: editorInstance
|
|
34
|
-
}
|
|
35
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|