mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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', '|',
|
'upload', 'record', '|',
|
||||||
'edit-mode', 'content-theme', 'code-theme', 'export', 'preview',
|
'edit-mode', 'content-theme', 'code-theme', 'export', 'preview',
|
||||||
],
|
],
|
||||||
mode: 'ir',
|
mode: UserContext.preferedEditorType || 'ir',
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
pin: true,
|
pin: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export default class TextareaHandler extends DOMAttachedObject {
|
|||||||
|
|
||||||
isCmEditor() {
|
isCmEditor() {
|
||||||
const editor = this.getCmEditor();
|
const editor = this.getCmEditor();
|
||||||
return (editor !== undefined && editor.isValid());
|
return (editor && editor.isValid);
|
||||||
}
|
}
|
||||||
|
|
||||||
val(...argv) {
|
val(...argv) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.6.3",
|
"version": "4.6.4",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
|
|||||||
@@ -81,6 +81,14 @@ lang_monaco_modes:
|
|||||||
go: go
|
go: go
|
||||||
rb: ruby
|
rb: ruby
|
||||||
jl: julia
|
jl: julia
|
||||||
|
preferedEditorType:
|
||||||
|
type:
|
||||||
|
wysiwyg: WYSIWYG
|
||||||
|
ir: Instant Rendering
|
||||||
|
sv: Split View
|
||||||
|
family: markdown
|
||||||
|
category: preference
|
||||||
|
value: ir
|
||||||
showInvisibleChar:
|
showInvisibleChar:
|
||||||
type: boolean
|
type: boolean
|
||||||
family: highlight
|
family: highlight
|
||||||
|
|||||||
Reference in new issue
Block a user