ui: quick emoji input support

This commit is contained in:
undefined committed 2021-09-13 21:07:16 +08:00
1 parent 402a58cd47
commit fae452cc94
6 files changed
+255 -108

No files matched your search

@@ -55,8 +55,7 @@ export default class Editor extends DOMAttachedObject {
// eslint-disable-next-line no-nested-ternary
this.model = typeof model === 'string'
? monaco.editor.getModel(monaco.Uri.parse(model))
? monaco.editor.getModel(monaco.Uri.parse(model))
: monaco.editor.createModel(value, language, monaco.Uri.parse(model))
|| monaco.editor.createModel(value, language, monaco.Uri.parse(model))
: model;
this.model.setValue(value);
this.model.updateOptions({ language });
@@ -111,6 +110,8 @@ export default class Editor extends DOMAttachedObject {
this.isValid = true;
if (hasFocus) this.focus();
if (autoResize) updateEditorHeight();
window.model = this.model;
window.editor = this.editor;
}
async initVditor() {