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', {
------------------------