Skip to content

怎么更新IEditorTab中的文本内容 #878

Description

@yuanwangcs

Question

// 打开一个文本文件

molecule.editor.open(transformToEditorTab(node))
updateStatusBarLanguage(node.data.language)

// 当底层文件发生变化的时候,希望已经打开的编辑器Tab中的文本也发生变化

if (molecule.editor.isOpened(tabId)) {
    const tab = molecule.editor.getTabById(tabId, 1)
    // 更新逻辑
    // 期望对 tab 做更新
}

我知道获取editorInstance是可以做到的,但是当前active的编辑器Tab不一定是我要修改的那个,有没有IEditorTab中的方法可以实现这一点

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions