将 TinyMCE Advanced 与插件的文本区域结合使用 - Wordpress
我正在 WordPress 中开发一个自定义插件。我还激活并运行了 TinyMCE Advanced Wordpress 插件。
我创建了一个普通的 HTML 文本区域,并使用 和 class="theEditor"
属性将其转换为 TinyMCE WYSIWYG 编辑器。问题是,它是 Wordpress 自己的 TinyMCE 实现,而不是 TinyMCE Advanced 插件的实现,这意味着我错过了它的所有功能,包括(对我的目的来说最重要的)“停止删除
标签”选项。
如何让文本区域触发 TinyMCE Advanced?
I'm developing a custom plugin in Wordpress. I also have the TinyMCE Advanced Wordpress plugin activated and working.
I created a normal HTML textarea, and converted it into a TinyMCE WYSIWYG editor, using the class="theEditor"
attribute. The problem is, it's Wordpress' own TinyMCE implementation, and NOT the TinyMCE Advanced plugin's implementation, which means I miss out on all its features, including the (most important for my purposes) "stop removing <p>
and <br>
tags" option.
How do I make the textarea trigger TinyMCE Advanced?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该看看这两篇文章:
http://allcreatives.net/2011/02/02/using-the-native-wordpress-tinymce-wysiwyg-editor-with-your-custom-post-meta -textareas/http://www.keighl.com/2010/01/tinymce-in-wordpress-plugins/并检查 the_editor (/wp-includes/general-template.php -> 第 1771 行)和 wp_tiny_mce(/wp-admin/includes/post.php -> 第 1377 行)也起作用。
更新了链接
这些链接已失效,但可以在此处的互联网档案中访问:
allcreative.net 页面
keighl.com 页面
You should have a look at these two articles:
http://allcreatives.net/2011/02/02/using-the-native-wordpress-tinymce-wysiwyg-editor-with-your-custom-post-meta-textareas/http://www.keighl.com/2010/01/tinymce-in-wordpress-plugins/And check the the_editor (/wp-includes/general-template.php -> line 1771) and the wp_tiny_mce (/wp-admin/includes/post.php -> line 1377) functions too.
Updated the links
These links are dead, but can be reached in the internet archive here:
allcreative.net page
keighl.com page