@seafile/sdoc-editor 2.0.136 → 2.0.137

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.
@@ -25,7 +25,8 @@ var withLink = function withLink(editor) {
25
25
  isInline = editor.isInline,
26
26
  insertData = editor.insertData,
27
27
  insertFragment = editor.insertFragment,
28
- onHotKeyDown = editor.onHotKeyDown;
28
+ onHotKeyDown = editor.onHotKeyDown,
29
+ onCompositionStart = editor.onCompositionStart;
29
30
  var newEditor = editor;
30
31
 
31
32
  // Rewrite isInline
@@ -183,6 +184,7 @@ var withLink = function withLink(editor) {
183
184
  return true;
184
185
  }
185
186
  }
187
+ return onCompositionStart && onCompositionStart(e);
186
188
  };
187
189
  return newEditor;
188
190
  };
@@ -19,7 +19,8 @@ var withMention = function withMention(editor) {
19
19
  isInline = editor.isInline,
20
20
  deleteBackward = editor.deleteBackward,
21
21
  deleteForward = editor.deleteForward,
22
- normalizeNode = editor.normalizeNode;
22
+ normalizeNode = editor.normalizeNode,
23
+ onCompositionStart = editor.onCompositionStart;
23
24
  var newEditor = editor;
24
25
  var eventBus = _eventBus["default"].getInstance();
25
26
  newEditor.insertText = function (text) {
@@ -210,6 +211,7 @@ var withMention = function withMention(editor) {
210
211
  event.preventDefault();
211
212
  return true;
212
213
  }
214
+ return onCompositionStart && onCompositionStart(event);
213
215
  };
214
216
  newEditor.onCompositionEnd = function (event) {
215
217
  var PrevMentionIptEntry = (0, _helper.getPrevMentionIptEntry)(newEditor);
@@ -17,7 +17,8 @@ var withQuickInsert = function withQuickInsert(editor) {
17
17
  onHotKeyDown = editor.onHotKeyDown,
18
18
  isInline = editor.isInline,
19
19
  deleteBackward = editor.deleteBackward,
20
- deleteForward = editor.deleteForward;
20
+ deleteForward = editor.deleteForward,
21
+ onCompositionStart = editor.onCompositionStart;
21
22
  var newEditor = editor;
22
23
  newEditor.isSlashKey = false;
23
24
  newEditor.insertText = function (text) {
@@ -159,6 +160,7 @@ var withQuickInsert = function withQuickInsert(editor) {
159
160
  event.preventDefault();
160
161
  return true;
161
162
  }
163
+ return onCompositionStart && onCompositionStart(event);
162
164
  };
163
165
  newEditor.isInline = function (element) {
164
166
  if ([_constants2.QUICK_INSERT].includes(element.type)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.136",
3
+ "version": "2.0.137",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "b853c017655f8db5ec240d17d67055aa532472b7"
73
+ "gitHead": "029acc16295db33531ca8a701cc43b9ba5ba62b2"
74
74
  }