TinyMCE editor not showing in PDF Templates after adding a wysiwyg field #5269

Open
opened 2026-02-20 16:32:14 -05:00 by deekerman · 0 comments
Owner

Originally created by @SinergiaCRM on GitHub (Nov 14, 2024).

Issue

In the PDF Templates module, when creating a WYSIWYG type field in Studio and adding it in the editing view, when accessing the editing view, the editor is not displayed in all fields that show a rich text editor.

Possible Fix

It seems that the error occurs because another TinyMCE configuration is already preloaded in the PDF Templates module's editing view.

Checking the plugins that are added in the include/SugarFields/Fields/Wysiwyg/SugarFieldWysiwyg.php file seems to fix it:

if ($vardef["custom_module"] != "AOS_PDF_Templates") {
$config['plugins'] = 'code, table, link, image, wordcount';
}

Steps to Reproduce the Issue

1. Go to Administration -> Studio -> PDF Templates
2. Create a WYSIWYG field
3. Edit the Edit View and add the new WYSIWYG field
4. Go to PDF Templates -> Create PDF Template
5. The WYSIWYG editor for the new field should load and not produce any errors in the browser console.

Context

No response

Version

7.14.5

What browser are you currently using?

Firefox

Browser Version

131.0.3 (64-bit)

Environment Information

MySQL, PHP Version 8.2

Operating System and Version

Ubuntu 22.04.4 LTS

Originally created by @SinergiaCRM on GitHub (Nov 14, 2024). ### Issue In the PDF Templates module, when creating a WYSIWYG type field in Studio and adding it in the editing view, when accessing the editing view, the editor is not displayed in all fields that show a rich text editor. ### Possible Fix It seems that the error occurs because another TinyMCE configuration is already preloaded in the PDF Templates module's editing view. Checking the plugins that are added in the include/SugarFields/Fields/Wysiwyg/SugarFieldWysiwyg.php file seems to fix it: ``` if ($vardef["custom_module"] != "AOS_PDF_Templates") { $config['plugins'] = 'code, table, link, image, wordcount'; } ``` ### Steps to Reproduce the Issue ```bash 1. Go to Administration -> Studio -> PDF Templates 2. Create a WYSIWYG field 3. Edit the Edit View and add the new WYSIWYG field 4. Go to PDF Templates -> Create PDF Template 5. The WYSIWYG editor for the new field should load and not produce any errors in the browser console. ``` ### Context _No response_ ### Version 7.14.5 ### What browser are you currently using? Firefox ### Browser Version 131.0.3 (64-bit) ### Environment Information MySQL, PHP Version 8.2 ### Operating System and Version Ubuntu 22.04.4 LTS
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#5269
No description provided.