Page 1 of 1

TinyMCE WYSIWYG

Posted: Mon Feb 22, 2021 1:05 pm
by Cyc
Hello everyone, how Can I add these options to TinyMCE instance?

Code: Select all

image_class_list: [
    {title: 'None', value: ''},
    {title: 'No border', value: 'img_no_border'},
    {title: 'Green border', value: 'img_green_border'},
    {title: 'Blue border', value: 'img_blue_border'},
    {title: 'Red border', value: 'img_red_border'}
  ]

Re: TinyMCE WYSIWYG

Posted: Mon Feb 22, 2021 1:07 pm
by velden

Re: TinyMCE WYSIWYG

Posted: Mon Feb 22, 2021 1:27 pm
by Cyc
Ok, but how Can I change code from JS to "options code"?

Re: TinyMCE WYSIWYG

Posted: Wed Feb 24, 2021 11:58 pm
by Cyc
I resolved my problem. We have to change TinyMCE WYSIWYG settings in "Template" tab. First we have to checked "Enable user templates" checkbox and change "Extra JavaScript options for the init script" to:

Code: Select all

image_class_list: [{title: "Brak", value: ""},{title: "Do lewej", value: "image-left"},{title: "Do prawej", value: "image-right"},{title: "Wyƛrodkuj", value: "image-center"}]
Has to be in one line.