Open slaFFik opened 7 years ago
I'm about to push some code live shortly that will open up the JS to extension. We can talk a patch at that point.
Great, Justin. Will wait for it. Oh, I believe this is it: https://github.com/justintadlock/butterbean/commit/eef32a37f155cd6031c11e02a28f63d4dd11f72b
Hi @justintadlock,
Would you like to see a PR, separate plugin or a patch attached? For own usage I just created a separate plugin butterbean-tinymce
, that does all the things (control class, template file, js-file loading).
Can you link up the butterbean-tinymce
plugin? I'd like to see the solution first before going through the trouble of a PR.
Sure, here it is: https://github.com/slaFFik/butterbean-tinymce Proof of concept, obviously. Lots of cleanup required.
Cool. That looks simple enough. I'm going to give it a test run in a little while.
Some things should be tweaked, example: hide those new tinymce DFM buttons, because they are triggering the main post/page/CPT editor, not the one you clicked.
Perhaps might be a good idea to give ability to pass some options from register_control()
to tinymce, so it will be init'ed with a slightly modified behaviour.
Just ideas.
@justintadlock Is there any way to speed up this new control development inside the ButterBean core?
Not really. 1.0.0 just got released. It'll be a while before I put out 1.1.0, so I'm not in any big rush at the moment.
Hi @justintadlock
I've added locally to your post meta box framework for own needs a new control: tinymce (using the one built-in WordPress). I think it's better to have it in core for wider use, as this is quite a common thing.
I can prepare a PR, but I need from you a development branch :)
Usage example:
Control template is the same as for textarea, some logic is in custom
class-control-tinymce.php
and inapi.controls.tinymce
view.What do you think?