Hacking tinymce.module I do font select & font size appears in advanced profile, as seen in the TinyMCE web page.

The change is:

// Add some extra features when using the advanced theme.
switch ($theme_name) {
case 'advanced':
$init['extended_valid_elements'] = 'a[href|target|name|title|onclick]';
$init['theme_advanced_buttons1_add'] = 'fontselect,fontsizeselect'; <----- HERE
$init['theme_advanced_buttons3_add_before'] = 'tablecontrols,separator';
$init['plugins'] = file_exists(drupal_get_path('module', 'tinymce'). '/tinymce/jscripts/tiny_mce/plugins/drupalimage')
? 'drupalimage,table,emotions,print' : 'table,emotions,print';
$init['theme_advanced_buttons3_add'] = 'drupalimage,emotions,separator,print';
break;
}

I compose the node using several font sizes and families, but when I save the node, the equivalent tags doesn't saves in it.

How can I do font size & family works?

Comments

rickyniano’s picture

Sorry, I don't know whay the original post hasn't saved completed.

Here is the complete post:

Hacking tinymce.module I do font select & font size appears in advanced profile, as seen in the TinyMCE web page.

The change is:

// Add some extra features when using the advanced theme.
switch ($theme_name) {
case 'advanced':
$init['extended_valid_elements'] = 'a[href|target|name|title|onclick]';
$init['theme_advanced_buttons1_add'] = 'fontselect,fontsizeselect';        // HERE!

But after composing the node using several font sizes and/or families, the node is saved without font changes.

How can I enable font size & family?

Thanks a lot.

dtan’s picture

I don't know an exact solution, but I would make sure that the filter (and tinymce) are allowing the font tag. What input filter are you using?

matt westgate’s picture

Version: 4.6.x-1.x-dev » master
Status: Active » Fixed

I committed a patch that allows you enable buttons simply by checking them. Should take care of this problem.

Anonymous’s picture

Status: Fixed » Closed (fixed)
nerkn’s picture

I hacked the wysiwyg/editors/tinymce.inc file @ 225th line where there is $init += array(.
adding

'theme_advanced_buttons1_add'=> 'fontselect, fontsizeselect',

to the init array. It works fine!

While there I've added

'theme_advanced_resize_horizontal' => TRUE,

Now editors can be resizeable