Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

节点编辑工具‘‘node-editor’’ 如何使用键盘退出编辑状态 #3721

Open
jiash1998 opened this issue Jun 30, 2023 · 7 comments
Labels
type: feature 新功能 Feature/enhancement requests

Comments

@jiash1998
Copy link

问题描述

使用了编辑工具后,双击节点进行编辑时回车默认是换行。我通过阻止按键默认行为避免了换行,但是无法退出编辑状态。

重现链接

暂无

重现步骤

暂无

预期行为

希望能提供这方面的api或者提供一个解决思路

平台

  • 操作系统: [ Windows]
  • 网页浏览器: [Google Chrome]
  • X6 版本: [2.11.1]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Jun 30, 2023

👋 @jiash1998

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@NewByVector
Copy link
Contributor

一般退出编辑状态的快捷键是 ESC 吧,可以在 cell-editor 中内置这个功能,欢迎提 PR 呀。

@NewByVector NewByVector added the type: feature 新功能 Feature/enhancement requests label Jul 3, 2023
@jiash1998
Copy link
Author

jiash1998 commented Jul 4, 2023

@NewByVector 我尝试了几款绘制思维导图的工具,基本都是在编辑时回车不提供换行操作,只提供退出编辑操作。然后节点有一个默认长度,文本溢出后就按回车退出编辑状态就会自动换行,所以希望提供这方面功能。我现在都是在单击画布空白处事件中来处理编辑状态的结束,所以感觉不是特别的合理。

@NewByVector
Copy link
Contributor

需求收到,已经加入到我们的工作计划中。

@wu0211
Copy link

wu0211 commented Jul 28, 2023

问一下,双击编辑之后,怎么获取节点编辑后的文本

@jiash1998
Copy link
Author

问一下,双击编辑之后,怎么获取节点编辑后的文本

好像在编辑状态时获取到的文本是空的,必须点击画布空白处或其他地方使这个节点退出编辑状态了,才能拿到编辑后的最新文本。

@lwqysu
Copy link

lwqysu commented Oct 21, 2024

您问题解决了吗。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature 新功能 Feature/enhancement requests
Projects
None yet
Development

No branches or pull requests

4 participants