mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-05 20:30:15 +01:00
This commit is contained in:
parent
e14ca5799b
commit
73505073e6
12 changed files with 42 additions and 59 deletions
|
|
@ -19,9 +19,9 @@ export class Editor extends Model {
|
|||
app: App,
|
||||
tab: Tab,
|
||||
blockId: string,
|
||||
rootId?: string, // 使用 rootId 会优先使用本地 filepositon 定位
|
||||
mode?: TEditorMode,
|
||||
action?: string[],
|
||||
scrollAttr?: IScrollAttr
|
||||
}) {
|
||||
super({
|
||||
app: options.app,
|
||||
|
|
@ -38,19 +38,19 @@ export class Editor extends Model {
|
|||
private initProtyle(options: {
|
||||
blockId: string,
|
||||
action?: string[]
|
||||
rootId?: string,
|
||||
mode?: TEditorMode,
|
||||
scrollAttr?: IScrollAttr
|
||||
}) {
|
||||
this.editor = new Protyle(this.app, this.element, {
|
||||
action: options.action || [],
|
||||
blockId: options.blockId,
|
||||
rootId: options.rootId,
|
||||
mode: options.mode,
|
||||
render: {
|
||||
title: true,
|
||||
background: true,
|
||||
scroll: true,
|
||||
},
|
||||
scrollAttr: options.scrollAttr,
|
||||
typewriterMode: true,
|
||||
after: (editor) => {
|
||||
if (window.siyuan.editorIsFullscreen) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue