@worktile/theia 14.1.3 → 14.1.4
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/esm2020/plugins/mention/mention.editor.mjs +1 -1
- package/esm2020/plugins/mention/mention.plugin.mjs +15 -10
- package/esm2020/plugins/quick-insert/quick-insert.plugin.mjs +3 -2
- package/fesm2015/worktile-theia.mjs +16 -10
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +16 -10
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -8757,16 +8757,21 @@ const withMention = (editor) => {
|
|
|
8757
8757
|
return renderElement(element);
|
|
8758
8758
|
};
|
|
8759
8759
|
editor.insertText = text => {
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
if (editor.selection && currentMention) {
|
|
8763
|
-
MentionEditor.openSuggestion(editor, currentMention.type);
|
|
8760
|
+
if (text === ' ') {
|
|
8761
|
+
MentionEditor.close(editor);
|
|
8764
8762
|
}
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
const
|
|
8768
|
-
|
|
8769
|
-
|
|
8763
|
+
else {
|
|
8764
|
+
const mentions = getPluginOptions(editor, PluginKeys.mention)?.mentions;
|
|
8765
|
+
const currentMention = mentions?.find(m => m?.trigger === text);
|
|
8766
|
+
if (editor.selection && currentMention) {
|
|
8767
|
+
MentionEditor.openSuggestion(editor, currentMention.type);
|
|
8768
|
+
}
|
|
8769
|
+
const searchInfo = MentionEditor.getSearchInfo(editor);
|
|
8770
|
+
if (searchInfo) {
|
|
8771
|
+
const { currentText } = searchInfo;
|
|
8772
|
+
const searchText = `${currentText}${text}`;
|
|
8773
|
+
MentionEditor.updateSearchText(editor, searchText);
|
|
8774
|
+
}
|
|
8770
8775
|
}
|
|
8771
8776
|
insertText(text);
|
|
8772
8777
|
};
|
|
@@ -9217,7 +9222,8 @@ const createQuickInsertPlugin = createPluginFactory({
|
|
|
9217
9222
|
key: PluginKeys.quickInsert,
|
|
9218
9223
|
withOverrides: withQuickInsert,
|
|
9219
9224
|
options: {
|
|
9220
|
-
hotkey: '/'
|
|
9225
|
+
hotkey: '/',
|
|
9226
|
+
disabledPlus: true
|
|
9221
9227
|
}
|
|
9222
9228
|
});
|
|
9223
9229
|
const allowOpenQuickToolbar = (editor, allowTypes) => {
|