I am trying to add a link/unlink and image button to my TinyMCE editor. Now I have the following code:
JavaScript
x
6
1
tinymce.init({
2
selector: 'textarea', // change this value according to your HTML
3
toolbar1: 'link unlink image',
4
toolbar2: 'undo redo | styleselect | bold italic | link | alignleft aligncenter alignright'
5
});
6
However its showing an empty first toolbar. Please see my fiddle: JSFiddle
Advertisement
Answer
You have used two toolbars though the issue seems to be with plugins, try instead using below:
JavaScript
1
11
11
1
tinymce.init({
2
selector: 'textarea', // change this value according to your HTML
3
plugins: [
4
"advlist autolink lists link image charmap print preview anchor",
5
"searchreplace visualblocks code fullscreen",
6
"insertdatetime media table contextmenu paste"
7
],
8
toolbar: 'undo redo | styleselect | bold italic | link | alignleft aligncenter alignright | link image',
9
10
});
11