@toast-ui/editor 3.1.2 → 3.1.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.
- package/dist/esm/i18n/ar.js +2 -2
- package/dist/esm/i18n/cs-cz.js +2 -2
- package/dist/esm/i18n/de-de.js +4 -4
- package/dist/esm/i18n/en-us.js +3 -3
- package/dist/esm/i18n/es-es.js +2 -2
- package/dist/esm/i18n/fi-fi.js +2 -2
- package/dist/esm/i18n/fr-fr.js +2 -2
- package/dist/esm/i18n/gl-es.js +2 -2
- package/dist/esm/i18n/hr-hr.js +2 -2
- package/dist/esm/i18n/i18n.js +4 -5
- package/dist/esm/i18n/it-it.js +2 -2
- package/dist/esm/i18n/ja-jp.js +3 -3
- package/dist/esm/i18n/ko-kr.js +3 -3
- package/dist/esm/i18n/nb-no.js +2 -2
- package/dist/esm/i18n/nl-nl.js +3 -3
- package/dist/esm/i18n/pl-pl.js +2 -2
- package/dist/esm/i18n/pt-br.js +2 -2
- package/dist/esm/i18n/ru-ru.js +2 -2
- package/dist/esm/i18n/sv-se.js +2 -2
- package/dist/esm/i18n/tr-tr.js +2 -2
- package/dist/esm/i18n/uk-ua.js +2 -2
- package/dist/esm/i18n/zh-cn.js +3 -3
- package/dist/esm/i18n/zh-tw.js +2 -2
- package/dist/esm/index.js +943 -722
- package/dist/esm/indexViewer.js +22 -16
- package/dist/i18n/ar.js +6 -6
- package/dist/i18n/cs-cz.js +6 -6
- package/dist/i18n/de-de.js +8 -8
- package/dist/i18n/es-es.js +6 -6
- package/dist/i18n/fi-fi.js +6 -6
- package/dist/i18n/fr-fr.js +6 -6
- package/dist/i18n/gl-es.js +6 -6
- package/dist/i18n/hr-hr.js +6 -6
- package/dist/i18n/it-it.js +6 -6
- package/dist/i18n/ja-jp.js +7 -7
- package/dist/i18n/ko-kr.js +7 -7
- package/dist/i18n/nb-no.js +6 -6
- package/dist/i18n/nl-nl.js +7 -7
- package/dist/i18n/pl-pl.js +6 -6
- package/dist/i18n/pt-br.js +6 -6
- package/dist/i18n/ru-ru.js +6 -6
- package/dist/i18n/sv-se.js +6 -6
- package/dist/i18n/tr-tr.js +6 -6
- package/dist/i18n/uk-ua.js +6 -6
- package/dist/i18n/zh-cn.js +7 -7
- package/dist/i18n/zh-tw.js +6 -6
- package/dist/toastui-editor-only.css +2 -2
- package/dist/toastui-editor-viewer.css +7 -7
- package/dist/toastui-editor-viewer.js +64 -41
- package/dist/toastui-editor.css +7 -7
- package/dist/toastui-editor.js +773 -547
- package/package.json +4 -3
- package/types/editor.d.ts +9 -1
- package/types/event.d.ts +1 -0
- package/types/index.d.ts +1 -1
- package/types/spec.d.ts +1 -1
- package/types/ui.d.ts +22 -20
- package/types/wysiwyg.d.ts +2 -1
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toast-ui/editor",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5",
|
|
4
4
|
"description": "GFM Markdown Wysiwyg Editor - Productive and Extensible",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nhn",
|
|
7
|
+
"nhn cloud",
|
|
7
8
|
"toast",
|
|
8
9
|
"toastui",
|
|
9
10
|
"toast-ui",
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
"dist/i18n",
|
|
48
49
|
"types"
|
|
49
50
|
],
|
|
50
|
-
"author": "NHN FE Development Lab <dl_javascript@nhn.com>",
|
|
51
|
+
"author": "NHN Cloud FE Development Lab <dl_javascript@nhn.com>",
|
|
51
52
|
"license": "MIT",
|
|
52
53
|
"repository": {
|
|
53
54
|
"type": "git",
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
},
|
|
78
79
|
"devDependencies": {
|
|
79
80
|
"@toast-ui/release-notes": "^2.0.1",
|
|
80
|
-
"@types/dompurify": "2.3.
|
|
81
|
+
"@types/dompurify": "2.3.3",
|
|
81
82
|
"cross-env": "^6.0.3"
|
|
82
83
|
},
|
|
83
84
|
"dependencies": {
|
package/types/editor.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Schema, NodeSpec, MarkSpec, Fragment } from 'prosemirror-model';
|
|
2
2
|
import { EditorView, Decoration, DecorationSet } from 'prosemirror-view';
|
|
3
|
-
import { EditorState, Plugin, Selection, TextSelection } from 'prosemirror-state';
|
|
3
|
+
import { EditorState, Plugin, PluginKey, Selection, TextSelection } from 'prosemirror-state';
|
|
4
|
+
import { undoInputRule, InputRule, inputRules } from 'prosemirror-inputrules';
|
|
5
|
+
|
|
4
6
|
import {
|
|
5
7
|
HTMLConvertor,
|
|
6
8
|
MdPos,
|
|
@@ -122,11 +124,17 @@ export interface PluginContext {
|
|
|
122
124
|
i18n: I18n;
|
|
123
125
|
pmState: {
|
|
124
126
|
Plugin: typeof Plugin;
|
|
127
|
+
PluginKey: typeof PluginKey;
|
|
125
128
|
Selection: typeof Selection;
|
|
126
129
|
TextSelection: typeof TextSelection;
|
|
127
130
|
};
|
|
128
131
|
pmView: { Decoration: typeof Decoration; DecorationSet: typeof DecorationSet };
|
|
129
132
|
pmModel: { Fragment: typeof Fragment };
|
|
133
|
+
pmRules: {
|
|
134
|
+
inputRules: typeof inputRules;
|
|
135
|
+
InputRule: typeof InputRule;
|
|
136
|
+
undoInputRule: typeof undoInputRule;
|
|
137
|
+
};
|
|
130
138
|
}
|
|
131
139
|
|
|
132
140
|
export type PluginFn = (context: PluginContext, options?: any) => PluginInfo | null;
|
package/types/event.d.ts
CHANGED
package/types/index.d.ts
CHANGED
package/types/spec.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export interface SpecManager {
|
|
|
37
37
|
addedCommands?: Record<string, EditorCommand>
|
|
38
38
|
): EditorAllCommandMap<DefaultPayload>;
|
|
39
39
|
|
|
40
|
-
keymaps(): Plugin<any, any>[];
|
|
40
|
+
keymaps(useCommandShortcut: boolean): Plugin<any, any>[];
|
|
41
41
|
|
|
42
42
|
setContext(context: SpecContext): void;
|
|
43
43
|
}
|
package/types/ui.d.ts
CHANGED
|
@@ -15,11 +15,6 @@ export interface ToolbarButtonOptions {
|
|
|
15
15
|
state?: ToolbarStateKeys;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
interface ToolbarCustomItemState {
|
|
19
|
-
active: boolean;
|
|
20
|
-
disabled: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
18
|
export interface ToolbarCustomOptions {
|
|
24
19
|
name: string;
|
|
25
20
|
tooltip?: string;
|
|
@@ -28,7 +23,7 @@ export interface ToolbarCustomOptions {
|
|
|
28
23
|
hidden?: boolean;
|
|
29
24
|
state?: ToolbarStateKeys;
|
|
30
25
|
onMounted?: (execCommand: ExecCommand) => void;
|
|
31
|
-
onUpdated?: (toolbarState:
|
|
26
|
+
onUpdated?: (toolbarState: ToolbarItemState) => void;
|
|
32
27
|
}
|
|
33
28
|
|
|
34
29
|
export type ToolbarButtonInfo = {
|
|
@@ -115,21 +110,28 @@ export interface TabInfo {
|
|
|
115
110
|
text: string;
|
|
116
111
|
}
|
|
117
112
|
|
|
118
|
-
interface
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
113
|
+
interface ToolbarItemState {
|
|
114
|
+
active: boolean;
|
|
115
|
+
disabled?: boolean;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
interface ToolbarStateMap {
|
|
119
|
+
taskList: ToolbarItemState;
|
|
120
|
+
orderedList: ToolbarItemState;
|
|
121
|
+
bulletList: ToolbarItemState;
|
|
122
|
+
table: ToolbarItemState;
|
|
123
|
+
strong: ToolbarItemState;
|
|
124
|
+
emph: ToolbarItemState;
|
|
125
|
+
strike: ToolbarItemState;
|
|
126
|
+
heading: ToolbarItemState;
|
|
127
|
+
thematicBreak: ToolbarItemState;
|
|
128
|
+
blockQuote: ToolbarItemState;
|
|
129
|
+
code: ToolbarItemState;
|
|
130
|
+
codeBlock: ToolbarItemState;
|
|
131
|
+
indent: ToolbarItemState;
|
|
132
|
+
outdent: ToolbarItemState;
|
|
131
133
|
}
|
|
132
|
-
export type ToolbarStateKeys = keyof
|
|
134
|
+
export type ToolbarStateKeys = keyof ToolbarStateMap;
|
|
133
135
|
|
|
134
136
|
export type ToolbarItemInfo = ToolbarCustomOptions | ToolbarButtonInfo;
|
|
135
137
|
export type ToolbarGroupInfo = ToolbarItemInfo[] & { hidden?: boolean };
|