[opencms-dev] Add Formats button to tinyMCE editor

Paul-Inge Flakstad flakstad at npolar.no
Thu Sep 24 15:06:18 CEST 2015


Hi Paoletti,

I'm no expert, but you should probably do this in /system/workplace/editors/tinymce/editor.jsp

Also, /system/workplace/editors/tinymce/opencms_plugin.jsp has an init function as well (~ line 314).

HTH :)

Cheers,
Paul

-----Original Message-----
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Paoletti Corrado
Sent: 24. september 2015 12:03
To: The OpenCms mailing list
Subject: [opencms-dev] Add Formats button to tinyMCE editor

Hi,
I use OpenCms 9.5.0. What I would like to do is to add the Formats button to tinyMCE editor (4.1.3 version). 

Into tinyMCE site I have found:

http://www.tinymce.com/wiki.php/Configuration:style_formats

so I edited the

/system/workplace/editors/editor.jsp

Adding

style_formats: [
	{title: 'Bold text', inline: 'b'},
	{title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
	{title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
	{title: 'Example 1', inline: 'span', classes: 'example1'},
	{title: 'Example 2', inline: 'span', classes: 'example2'},
	{title: 'Table styles'},
	{title: 'Table row 1', selector: 'tr', classes: 'tablerow1'} ],

to tinyMCE.init() call.

Formats button doesn't appear. Could someone help me?

Cheers,

--
Corrado
_______________________________________________
This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev






More information about the opencms-dev mailing list