mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: 支持设置编辑器模式偏好
This commit is contained in:
1 parent
a7dc00361c
commit
bee8537a91
4 files changed
+11
-3
No files matched your search
@@ -9,7 +9,7 @@ export const config = {
|
||||
'upload', 'record', '|',
|
||||
'edit-mode', 'content-theme', 'code-theme', 'export', 'preview',
|
||||
],
|
||||
mode: 'ir',
|
||||
mode: UserContext.preferedEditorType || 'ir',
|
||||
toolbarConfig: {
|
||||
pin: true,
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@ export default class TextareaHandler extends DOMAttachedObject {
|
||||
|
||||
isCmEditor() {
|
||||
const editor = this.getCmEditor();
|
||||
return (editor !== undefined && editor.isValid());
|
||||
return (editor && editor.isValid);
|
||||
}
|
||||
|
||||
val(...argv) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.6.3",
|
||||
"version": "4.6.4",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -81,6 +81,14 @@ lang_monaco_modes:
|
||||
go: go
|
||||
rb: ruby
|
||||
jl: julia
|
||||
preferedEditorType:
|
||||
type:
|
||||
wysiwyg: WYSIWYG
|
||||
ir: Instant Rendering
|
||||
sv: Split View
|
||||
family: markdown
|
||||
category: preference
|
||||
value: ir
|
||||
showInvisibleChar:
|
||||
type: boolean
|
||||
family: highlight
|
||||
|
||||
Reference in new issue
Block a user