Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add multiple plugin in tinymce?

I have tried this simple code for try tinyMCE.It is working fine.Here the problem is when I am trying to add multiple plugin it is not working.Here I have used tinymce CDN.Here is the code

<!DOCTYPE html>
<html>
<head>
<script src="http://tinymce.cachefly.net/4.0/tinymce.min.js"></script>

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


</head>
<body>
        <textarea></textarea>
</body>
</html>

Here code plugin is working but image plugin not working.If I remove code plugin than image plugin working.How can I apply both plugin?

like image 379
Alimon Karim Avatar asked May 25 '14 10:05

Alimon Karim


People also ask

How do you add a custom plugin to TinyMCE?

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.

Is TinyMCE free for commercial use?

Is TinyMCE free? Yes. The TinyMCE core editor is free to use for commercial and noncommercial purposes.


1 Answers

You are specifying the plugins property twice. It should only be there once and then multiple plugins should be specified in that property. According to the documentation you need to be using a comma or space separated string, or an array of strings. Try this below:

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

https://www.tinymce.com/docs/configure/integration-and-setup/#plugins

like image 111
dmullings Avatar answered Oct 13 '22 00:10

dmullings