mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: quick emoji input support
This commit is contained in:
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() {
|
||||
|
||||
Reference in new issue
Block a user