Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load Wiris plugin in Tinymce 4

I am about using Wiris with Tinymce. Following the tutorial at INSTALLATION INSTRUCTIONS: WIRIS PLUGIN FOR TINYMCE , I am unable to go over step 4.

Each time I load the plugins tiny_mce_wiris_formulaEditor, tiny_mce_wiris_formulaEditorChemistry, and tiny_mce_wiris_CAS, the Tinymce text editor does no longer appear.

Here is my code sample

<script src="{{asset('assets/js/tinymce/plugins/tiny_mce_wiris/editor_plugin.js')}}"></script>

<script src="{{asset('assets/js/tinymce/tinymce.min.js')}}"></script>

<script>
    tinymce.init({
        selector: 'textarea',
        plugins: "image imagetools tiny_mce_wiris_formulaEditor tiny_mce_wiris_formulaEditorChemistry tiny_mce_wiris_CAS"
});
</script>

I wish to know the right way to to it.

This is the error I get in my javascript console

"NetworkError: 404 Not Found - .../assets/js/tinymce/plugins/tiny_mce_wiris_formulaEditor/plugin.min.js"

"NetworkError: 404 Not Found - .../assets/js/tinymce/plugins/tiny_mce_wiris_CAS/plugin.min.js"

"NetworkError: 404 Not Found - .../assets/js/tinymce/plugins/tiny_mce_wiris_formulaEditorChemistry/plugin.min.js"
like image 596
The Oracle Avatar asked Apr 23 '16 20:04

The Oracle


People also ask

How do I install TinyMCE plugins?

Using custom plugins with TinyMCE Copy code into plugins folder: Copy the entry point file (and any other files) into the plugins folder of the distributed TinyMCE code. The plugin can then be used by including it in the list of plugins specified by the plugins option.

Where do I put TinyMCE init?

1 Answer. Show activity on this post. and then in the administrator area go to the plugins manager and open up editors - tinymce, click on the advanced tab and then add it to the custom plugins area.


2 Answers

The name of the plugin you need to include in the plugins section on tinymce.init is tiny_mce_wiris. You have included the name of the buttons instead (tiny_mce_wiris_formulaEditor, tiny_mce_wiris_formulaEditorChemistry and tiny_mce_wiris_CAS).

    tinymce.init({
    selector: 'textarea',
    plugins: "image imagetools tiny_mce_wiris"});
like image 73
WIRIS support Avatar answered Sep 20 '22 16:09

WIRIS support


Apart from downloading and using TinyMCE plugin , you can even use Wiris as externally hosted plugin. I followed this documentation http://www.wiris.com/plugins/docs/resources/external-plugin

My component looked like following, and I was able to get Wiris to work this way.

<editor apiKey="test" [init]="{ plugins : 'image', external_plugins: { tiny_mce_wiris: 'https://www.wiris.net/demo/plugins/tiny_mce/plugin.js' }, toolbar: 'tiny_mce_wiris_formulaEditor' } "></editor>

like image 24
Pratik Singhal Avatar answered Sep 22 '22 16:09

Pratik Singhal