For a client I'm using Site Origins Page Builder plugin. It enables the client to make rich layouts for each page by dragging and dropping widgets. Site Origin widgets that require a WYSIWYG-editor use the Black Studio TinyMCE plugin to include that feature.

In the past I've made some plugins that extend the Site Origin default widget class to add a TinyMCE to my widget. For the current plugin I'm building I require 3 TinyMCE fields. Therefor it's not feasible to merely extend the SO default widget class.

Using the info found here I managed to get the a part of the tinyMCE loaded. The buttons above the textarea (in both visual and text) are not present. When I try switching from text view to visual view I end up with the following javascript error:

Uncaught TypeError: Cannot read property 'canvas' of undefined

I'm pretty sure I need to require another javascript file that "fixes" the default TinyMCE behavior. I am however stuck in how to do this.

Alternatively I can include my own TinyMCE version/instance in the plugin. However, I find this to be undesirable because of the following reasons:

  • Black Studio TinyMCE is already installed as well as the default Wordpress TinyMCE. Requiring 3 wysiwyg-editors doesn't seem like the best approach.
  • The default TinyMCE and the Black Studio one are very close visually which is great from a UX perspective. However, adding yet another TinyMCE will result in either a degradation of UX or will require me to style it exactly like the other 2 (which is like reinventing the wheel).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.