[Vuejs]-How to fix plugin error appear inside TinyMCE 4 editor

0👍

That error message means that TinyMCE is looking for your plugin (mybutton) in the place it looks for all of its standard plugins and the plugin is not found in that location.

The issue is that you have not actually created a plugin for TinyMCE in the code you show – you appear to create toolbar button via code.

To move this forward you have two options…

  1. Use the setup function in your TinyMCE configuration and create the toolbar button in that function. You can then add the toolbar button to your toolbar configuration setting. In this scenario you are not creating a plugin so you don’t add anything to the plugins configuration setting.
  2. Create a proper TinyMCE plugin and load that plugin using the plugins configuration setting. The plugin can register a toolbar button on the toolbar as it loads.

If you choose option 1…
Assuming your code is wired together correctly you can just remove your attempt to load a plugin called mybutton (there is no such plugin) and instead add mybutton to the toolbar1 configuration setting. This will explicitly add your defined toolbar button to the TinyMCE toolbar.

If you choose option 2…
As you are using the TinyMCE Cloud platform to load TinyMCE you need to use the external_plugins configuration option to load your custom plugin from some location on your server. You can’t host a custom plugin on the TinyMCE Cloud platform and just adding a plugin to the plugins configuration option will tell TinyMCE to load it from the same place it loads all its other plugins.

If you want to look at this second option here is the documentation on how to create a proper plugin for TinyMCE:

Leave a comment