TinyMCE Styles?

In upgrading to 8.5 and latest php, i also lost the legacy pdf editor i was relying on, and now have to use tinyMCE?

I’ve found that creating professional looking PDF’s in suitecrm to be virtually impossible because of the editor, and now for the life of me i cant set the font size to 11 when generating PDF’s.

I’ve tried adding the new font size to include/jaavscript.tiny_mce/editor_template.js, but i think i need to add the sizes as a style?

How do you go about adding custom styles to the editor?

1 Like

I also have other issues such as margin and padding on tables/spans displaying correctly within the editor and detail page, but getting ignored completely when the PDF is generated.

It seems as though tcpdf is not playing ball with tinyMCE at all.

1 Like

Modify TinyMCE Configuration:

  1. Locate the Configuration File:
  • The TinyMCE configuration for SuiteCRM is typically located in a file like modules/AOS_PDF_Templates/tpls/tpls_config_js.phtml.
  1. Custom Styles:
  • Add custom styles to the TinyMCE initialization script. This can include specifying font sizes.

tinyMCE.init({

// Existing configurations…

content_css: “/themes/default/css/custom-tinymce-styles.css”, // Add a custom CSS file

style_formats: [

{ title: ‘Custom Size’, inline: ‘span’, styles: { ‘font-size’: ‘11px’ } },

// Add more custom styles as needed

],

// Other configurations…

});

Just me-tooing, have no idea where to even begin looking to fix the margin/padding issues. They seems to vary between table to table, as some display correctly, then another right below it also set to width 100% will clip off the right edge of the page.

Very tough getting professional output.