在tinymce文本区域中输入时,如何将字符附加到文本框,直到按ENTER键?
我有一个简单的文本框和一个“tinymce-d”的文本区域。 我想将在tinymce中输入的字符附加到文本框内容,直到按ENTER键
I have a simple textbox and a textarea which is "tinymce-d".
I'd like to append characters that I type into tinymce to textbox contents until I press ENTER
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
ShankarSangolis 方法的修正。 Tinymce 可以针对文本区域进行初始化,但它是一个内容可编辑的 iframe,而文本区域(或其他初始化 html 元素)将被隐藏。这是正确的做法。您需要在 tinymce init 上或之后调用此代码,然后用户才能键入。
Correction of ShankarSangolis approch. Tinymce may be initialized for a textarea, but it is a contenteditable iframe while the textarea (or other init html element) becomes hidden. This is the correct way to do it. You need to call this code eigther on tinymce init or afterwards befor a user can type.
试试这个。
Try this.
这是我使用 dugin tinymce init 的代码:
stop 是在 init 之前初始化的全局变量,然后 window.stop 在需要时获取值。
Here's the code I'm using dugin tinymce init:
stop is a global variable initialized before the init and then window.stop gets value when needed.