0

He there!

I get along better and better with IP4 :-)

Now I am trying to use some Bootstrap classes inside the defailt tinyMCE but I can't help why it does not work.

I added a tinymceConfig.js inside my theme's assets-folder with the following content:

var originalConfigFunction = ipTinyMceConfig;

var ipTinyMceConfig = function () {
  var originalConfig = originalConfigFunction();

  originalConfig.visual_table_class = 'table';
  originalConfig.style_formats = [
    {title: 'Quote', inline: 'span', classes: 'quote'},
    {title: 'Note', inline: 'span', classes: 'bg-primary'},
    {title: 'Buttons', inline: 'span', classes: 'btn'}
  ]; 

  return originalConfig;
}

But nothing happens. Is my code bad? Do I have to activate some "switch" anywhere to make this change work?

Thank you and best regards,

Doc

1 Answers1

0

The code looks good. Have you registered this file using ipAddJs function in your theme? Do you see this file to be listed in page source code? Do you see any errors in browser console?

Mangirdas Skripka
  • 1,647
  • 1
  • 15
  • 14
  • I have registered it adding the line to my js-config in the template's footer: `` And it is listed in the source code of the website, there are no errors in the browser's console. – Doc TheJones Oct 13 '14 at 18:46