CMS MADE SIMPLE FORGE

TinyMCE

 

[#12811] Solve errors in default JavaScript template: TinyMCE:: Menubar , Adanced menu and custom dropdown

avatar
Created By: Philippe Thomas (filto)
Date Submitted: Fri Dec 19 22:39:13 -0500 2025

Assigned To: Rolf (rolf1)
Version: 4.0.0-beta1
CMSMS Version: 2.2.22
Severity: Minor
Resolution: Works For Me
State: Open
Summary:
Solve errors in default JavaScript template: TinyMCE:: Menubar , Adanced menu and custom dropdown
Detailed Description:
### --- menubar and Advanced menu ( Do not work has expected) - solved this way
: -------------------------------

From admin TinyMCE -> Menubar Tab :

activate "Show menubar"

Case 1 (use Adanced menu):
by activating the "Adanced menu" from the administration
then the default menubar of the module is displayed !
No matter what you define in the "Menubar" field.
If "menubar" Field is set,  this is not what is expected !

Case 2 (get the default Menubar) :
by activating the "Show menubar" from the administration
and leave empty the "Menubar" Field.
and NOT activating the "Adanced menu"
Then NO Menubar is render just like if "Show menubar" was not activated !
it should render the default menubar of the module

L65
------------------------
{* MENU BAR *}
{if !$profile->show_menubar}
	menubar: false,
{else}
	{if $profile->use_advanced_menu && !empty($profile->advanced_menu)}
		menu: {$profile->advanced_menu},
	{else}
		menubar: '{$profile->menubar}',
	{/if}
{/if}
--- replaced by ----------
{* MENU BAR *}
{if !$profile->show_menubar}
	menubar: false,
{else}
	{if $profile->menubar && !empty($profile->menubar)}
	        menubar: '{$profile->menubar}',
	 {/if}
	 {if $profile->use_advanced_menu && !empty($profile->advanced_menu)}
		menu: {$profile->advanced_menu},
	{/if}
{/if}------------------------
then it works as expected..




### --- custom dropdown do not display submenu and is not usable, solved this
way : --------------------------------------

correction :
to make it usable, remove : context: 'insert', 
to display as expected : replace : addMenuItem by addNestedMenuItem

L242
------------------------
editor.ui.registry.addMenuItem('customdropdown', {
context: 'insert',
--- replaced by ----------
editor.ui.registry.addNestedMenuItem('customdropdown', {
------------------------


History

Updates

Updated: 2025-12-22 21:24
resolution_id: 5 => 11

Updated: 2025-12-19 22:40
summary: errors in default JavaScript template: TinyMCE:: Menubar , Adanced menu and custom dropdown => Solve errors in default JavaScript template: TinyMCE:: Menubar , Adanced menu and custom dropdown
resolution_id: => 5