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

节点内输入的内容怎么换行? #609

Open
w4rw4r opened this issue Jun 4, 2024 · 1 comment
Open

节点内输入的内容怎么换行? #609

w4rw4r opened this issue Jun 4, 2024 · 1 comment

Comments

@w4rw4r
Copy link

w4rw4r commented Jun 4, 2024

节点点输入时Enter、Shift+Enter、Ctrl+Enter、Alt+Enter都不能实现换行操作,而且粘贴多行文本后也是现实单行,貌似\n换行符无效

@hizzgdev
Copy link
Owner

hizzgdev commented Jun 4, 2024

是的,目前默认的输入框是单行输入框,所以任何换行字符都不能输入。
如果你的目的是让用户能输入换行,可以有两种方法:

  • 修改源码,把单行输入框改成多行输入框,并处理好回车事件:换行还是保存
  • 不直接使用jsmind的编辑功能,而使用api来更新节点内容,配合 custom_render 把换行符替换成<br>

如果有困难可以再来寻求帮助。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants