【求助】如何使用自定义的Editor替换内置CodeEditor #3013
Unanswered
MilkWangStudio
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@MilkWangStudio 目前底部可以使用 import {
BrowserEditorContribution,
EditorComponentRegistry,
} from '@opensumi/ide-editor/lib/browser';
@Domain(BrowserEditorContribution)
export class CustomNavigationContribution implements BrowserEditorContribution {
...
registry.registerEditorSideWidget({
id: CUSTOM_NAVIGATION_WIDGET_ID,
component: CustomNavigation,
// 只有 git 协议的文件下才显示
displaysOnResource: (r) => {
return r.uri.scheme === 'git';
},
});
...
} 可以参考这块逻辑提个 PR 适配一下顶部场景,代码部分应该不会很复杂 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
目前Editor的Tool面板是在右上角,我需要修改下,将操作栏放到Tab栏下方,我看CodeEditor的组件里这部分没办法配置,所以我想自己实现一个Editor,但是又想继承对于和FileTree的联动、自动保存等特性,请问有什么思路吗~
参考
Beta Was this translation helpful? Give feedback.
All reactions