tmagic-editor icon indicating copy to clipboard operation
tmagic-editor copied to clipboard

开发一个文本编辑组件,怎么接收到双击事件进入文本编辑状态,而且在这个编辑状态可以相应鼠标选中文本,定位光标操作

Open kingjinkin opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

kingjinkin avatar Mar 17 '24 15:03 kingjinkin

双击事件已经有对应的行为了 image 可以通过修改其行为实现

stageOverlayService.usePlugin({
  beforeOpenOverlay(el) {
     if (isInput(el)) {
        // do something
        return [null];  // return [null]可以阻止原有行为
     }
     return [el]
  }
})

jia000 avatar Mar 18 '24 03:03 jia000

大佬,请问组件进入编辑状态怎么可以收到鼠标相关事件呢

kingjinkin avatar Mar 24 '24 15:03 kingjinkin