responsiv / campaign-plugin

[PREMIUM] Send professional campaign messages to your subscribers.
http://octobercms.com/plugin/responsiv-campaign
5 stars 2 forks source link

froalaEditor fontSize #45

Closed jvanremoortere closed 2 years ago

jvanremoortere commented 6 years ago

For some reason a client really wants to use font size 16 in the richeditor (standard jums from 14 to 18). I was already able to edit the toolbar by entering variables for the toolbarButtons as follows in my template:

{richeditor                                                     toolbarButtons="undo,redo,clearFormatting,html,bold,italic,underline,strikeThrough,paragraphFormat,align,fontFamily,fontSize,color,formatUL,formatOL,outdent,insertLink,insertImage,insertTable,fullscreen"
name="content_body" 
size="large"}
{/richeditor}

But can't seem to figure out how to define the font sizes. Froala mentions you can setup the font sizes with javascript using

$('.selector').froalaEditor({
  fontSize: ['8', '10', '12', '14', '18', '30', '60', '96']
});

But this doesn't seem to work. Adding the array of font sizes to the toolbarButtons fontSize ( as fontSize:[...] ) doesn't seem to work either. Any idea on this?

daftspunk commented 2 years ago

Sorry for the 5 year delay...

  $.extend($.FE.DEFAULTS, {
    fontSize: ['8', '9', '10', '11', '12', '14', '18', '24', '30', '36', '48', '60', '72', '96'],
});

That's how you do it