开发者

WordPress 3.2: Add TinyMCE Buttons to HTML Editing in press-this.php

开发者 https://www.devze.com 2023-03-19 11:48 出处:网络
When I choose \"HTML\" (instead of \"Visual\") for the editor in press-this.php I want the TinyMCE buttons to show up like they do when adding/editing a post via post.php.

When I choose "HTML" (instead of "Visual") for the editor in press-this.php I want the TinyMCE buttons to show up like they do when adding/editing a post via post.php.

For example, here's a clipped screen shot of the buttons available in post.php when "HTML" is active:

WordPress 3.2: Add TinyMCE Buttons to HTML Editing in press-this.php

How do I get those buttons to show when开发者_Python百科 using press-this.php?

I think this has to be a simple change but I haven't found a simple answer. I haven't written any plugins before so if that's the solution I'd like some pointers.


Using "HTML" mode in WordPress (whether you are in press-this or posts or pages) is mutually exclusive with having the TimeMCE buttons showing up. Clicking "Visual" puts you in TinyMCE mode. Clicking "HTML" turns off TinyMCE mode.

TinyMCE helps you write HTML even if you don't know how to write HTML (clicking the B button basically wraps the text you have selected with a <strong></strong> tag pair) . If you don't know HTML or you want an editor to help you write it faster, use "Visual". If you want to write the HTML yourself or you want to tweak the HTML output of TinyMCE, then use "HTML".


I am not that much into WordPress, but here is a very neat HowTo of Moxiecode (the enterprise behind tinymce) which decribes how to write an own plugin (it is not that difficult).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号