Giter VIP home page Giter VIP logo

Comments (4)

wewoor avatar wewoor commented on May 27, 2024

@resetsix 可以参考这份文档:https://dtstack.github.io/molecule/zh-CN/docs/guides/extend-keybinding

from molecule.

resetsix avatar resetsix commented on May 27, 2024

@resetsix 可以参考这份文档:https://dtstack.github.io/molecule/zh-CN/docs/guides/extend-keybinding

谢谢回复,Keybinding 也确实能提高交互体验。但快捷键编辑器右键菜单是两个独立的东西,我仍然想为编辑器右键菜单新增一些额外的操作选项^v^。

from molecule.

mortalYoung avatar mortalYoung commented on May 27, 2024

如果你是想要针对 monaco-editor 的编辑器添加/删除菜单的话,这个 Molecule 这边没有相关的 API 去实现。

而且 monaco-editor 目前针对删除菜单项也没有相关的 API 可以调用。

我提供一个思路,但是不一定可行,你可以测试一下。
首先确保你目前全局只有一个 monaco-editor 的实例

refer: microsoft/monaco-editor#1280

from molecule.

resetsix avatar resetsix commented on May 27, 2024

如果你是想要针对 monaco-editor 的编辑器添加/删除菜单的话,这个 Molecule 这边没有相关的 API 去实现。

而且 monaco-editor 目前针对删除菜单项也没有相关的 API 可以调用。

我提供一个思路,但是不一定可行,你可以测试一下。 首先确保你目前全局只有一个 monaco-editor 的实例

* 然后针对添加的话参考 https://microsoft.github.io/monaco-editor/playground.html#interacting-with-the-editor-adding-an-action-to-an-editor-instance 这个案例。

* 针对删除的话 `require('vs/platform/actions/common/actions').MenuRegistry._menuItems` 你试试这个方式

refer: microsoft/monaco-editor#1280

好嘞,我明白了。我先去逝一逝

from molecule.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.