ollinscarryleel

帅哥们,求指导, Monaco 编辑器,怎么实现马克笔效果?

  •  1
     
  •   ollinscarryleel · Oct 13, 2023 · 1681 views
    This topic created in 1120 days ago, the information mentioned may be changed or developed.
    ollinscarryleel
    ollinscarryleel
    OP
    Oct 13, 2023
    1


    未选择状态下,需要这种效果
    ollinscarryleel
    ollinscarryleel
    OP
    Oct 16, 2023
    2
    解决办法
    ```
    var decorations = editor.createDecorationsCollection([
    {
    range: new monaco.Range(7, 1, 7, 24),
    options: { inlineClassName: "自定义 Range 范围的 class 样式名称" },
    },
    ]);
    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   860 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 21:02 · PVG 05:02 · LAX 13:02 · JFK 16:02
    ♥ Do have faith in what you're doing.