Issues with tinymce in PDF Templates

Hello. I’m having big issues with the PDF Template module in suitecrm. I’m on the latest version of suitecrm 7 (7.12.5), and I’ve added my custom module to the PDF Template types. All is fine there, and I’m able to link my custom module. However, when I select a field, and press ‘INSERT’ nothing gets updated in the tinyMCE editor. When I save it anyway, it turns out in many cases that the field was actually added in, but nothing appeared in the tinyMCE editor. It seems to have a mind of its own at the moment. When I clear the body and save it, it hasn’t updated the body and shows the old content.

This is really frustrating. Does anyone have any experience of this. I’ve seen the code that attempts to insert the item into the editor, which is located inside AOS_PDF_Templates.js, and I’ve tried some various things, but all with no success. I’ve tried Chrome, Firefox, Safari, Edge and IE, all with no luck. If anyone has experienced this problem before then any help is greatly appreciated! Thanks.

Can you share a screenshot? Does TinyMCE show the toolbar buttons?

Do you see any errors in your browser’s developer console?


Think I found the issue. I was overriding the view.edit.php file of the PDF_Templates module due to some additional logic I’ve added for my custom modules, but then realised I was executing certain logic twice, this included the activation of the tinyMCE editors for the the PDF_Templates module. After ensuring that they are only executed once, the editor was fine, and I was able to insert variables from all modules.

1 Like