Jump to content

Recommended Posts

Posted

Hello guys,

I'm struggling with customization of Tiny MCE toolbar in Processwire administration. I didn't found many topics regarding this on Forum page so there will probably be someone who can easily help me. ;)

I am trying to add some standard functionality to TinyMCE. I found this file:

mysite/admin/wire/modules/Inputfield/InputfieldTinyMCE/InputfieldTinyMCE.module

According to tutorials and manuals about TinyMCE I found this part of code and tried to update it with more functions:

protected $defaults = array(

'theme_advanced_buttons1' => 'formatselect,styleselect|,bold,italic,underline|,bullist,numlist,|,link,unlink,|,image,|,code,|,fullscreen',

'theme_advanced_buttons2' => 'strikethrough,justifyleft,justifycenter,justifyright,justifyfull,undo,redo,tablecontrols',

'theme_advanced_blockformats' => 'p,h2,h3,h4,blockquote,pre,code',

'plugins' => 'inlinepopups,safari,table,media,paste,fullscreen,preelementfix',

'valid_elements' => '@[id|class],a[href|target|name],strong/b,em/i,br,img[src|id|class|width|height|alt],ul,ol,li,p[class],h2,h3,h4,blockquote,-p,-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],pre,code',

);

I added some functions to variable: theme_advanced_buttons2

Unfortunately it didn't work properly in Tiny MCE as you can see on picture below:

post-180-0-82483700-1329940698_thumb.jpg

Thanks for any help!

Posted

Welcome to the forum! I'm on a mobile phone, so have to keep it short--Those 'defaults' settings are really only good for when the field is first created. Your best bet is to edit the settings of the field using tinymce instead. You'll find this by editing the textarea field, clicking to details, then editing the tinymce advanced options'.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...