diff --git a/app/code/core/Mage/Cms/etc/config.xml b/app/code/core/Mage/Cms/etc/config.xml
index 5de3bf4c1a2..076866d5261 100644
--- a/app/code/core/Mage/Cms/etc/config.xml
+++ b/app/code/core/Mage/Cms/etc/config.xml
@@ -200,7 +200,7 @@
enabled
- tinymce-5
+ oxide
diff --git a/js/mage/adminhtml/wysiwyg/tinymce/plugins/openmagevariable.js b/js/mage/adminhtml/wysiwyg/tinymce/plugins/openmagevariable.js
index 8a44eaa6fd8..a355bb6dcd5 100644
--- a/js/mage/adminhtml/wysiwyg/tinymce/plugins/openmagevariable.js
+++ b/js/mage/adminhtml/wysiwyg/tinymce/plugins/openmagevariable.js
@@ -31,13 +31,21 @@ tinymce.PluginManager.add('openmagevariable', (ed, url) => {
'' +
''
);
-
+
+ let onAction = function () {
+ editor.execCommand('openVariablesPopup');
+ }
+
editor.ui.registry.addToggleButton('openmagevariable', {
icon: 'openmagevariable',
- tooltip: Translator.translate('Insert Variable'),
- onAction: function () {
- editor.execCommand('openVariablesPopup');
- }
+ tooltip: Translator.translate('OpenMage Variable'),
+ onAction: onAction
+ });
+
+ editor.ui.registry.addMenuItem('openmagevariable', {
+ icon: 'openmagevariable',
+ text: Translator.translate('OpenMage Variable'),
+ onAction: onAction
});
},
diff --git a/js/mage/adminhtml/wysiwyg/tinymce/plugins/openmagewidget.js b/js/mage/adminhtml/wysiwyg/tinymce/plugins/openmagewidget.js
index 0f1a5810adc..b88674d5fe1 100644
--- a/js/mage/adminhtml/wysiwyg/tinymce/plugins/openmagewidget.js
+++ b/js/mage/adminhtml/wysiwyg/tinymce/plugins/openmagewidget.js
@@ -35,25 +35,36 @@ tinymce.PluginManager.add('openmagewidget', (ed, url) => {
''
);
+ let onAction = function () {
+ editor.execCommand('mceOpenmagewidget');
+ }
+
+ let onSetup = function (api) {
+ // Add a node change handler, selects the button in the UI when a image is selected
+ editor.on('NodeChange', function (e) {
+ api.setActive(false);
+ var n = e.target;
+ if (n.id && n.nodeName == 'IMG') {
+ var widgetCode = Base64.idDecode(n.id);
+ if (widgetCode.indexOf('{{widget') != -1) {
+ api.setActive(true);
+ }
+ }
+ });
+ }
+
editor.ui.registry.addToggleButton('openmagewidget', {
icon: 'openmagewidget',
- tooltip: Translator.translate('Insert Widget'),
- onAction: function () {
- editor.execCommand('mceOpenmagewidget');
- },
- onSetup: function (api) {
- // Add a node change handler, selects the button in the UI when a image is selected
- editor.on('NodeChange', function (e) {
- api.setActive(false);
- var n = e.target;
- if (n.id && n.nodeName == 'IMG') {
- var widgetCode = Base64.idDecode(n.id);
- if (widgetCode.indexOf('{{widget') != -1) {
- api.setActive(true);
- }
- }
- });
- }
+ tooltip: Translator.translate('OpenMage Widget'),
+ onAction: onAction,
+ onSetup: onSetup
+ });
+
+ editor.ui.registry.addMenuItem('openmagewidget', {
+ icon: 'openmagewidget',
+ text: Translator.translate('OpenMage Variable'),
+ onAction: onAction,
+ onSetup: onSetup
});
// Add a widget placeholder image double click callback
diff --git a/js/mage/adminhtml/wysiwyg/tinymce/setup.js b/js/mage/adminhtml/wysiwyg/tinymce/setup.js
index a2126743ff3..a7558f04064 100644
--- a/js/mage/adminhtml/wysiwyg/tinymce/setup.js
+++ b/js/mage/adminhtml/wysiwyg/tinymce/setup.js
@@ -55,12 +55,8 @@ tinyMceWysiwygSetup.prototype =
getSettings: function (mode) {
- var plugins = 'autoresize accordion searchreplace visualblocks visualchars anchor code lists advlist fullscreen pagebreak table wordcount directionality image charmap link media nonbreaking';
- var toolbar = [
- 'bold italic underline strikethrough | alignleft aligncenter alignright alignjustify alignnone | styles fontfamily fontsize',
- 'cut paste pastetext copy | searchreplace | bullist numlist advlist accordion | indent outdent blockquote | undo redo | link unlink anchor | image charmap media code | forecolor backcolor',
- 'table | h1 h2 h3 h4 h5 h6 | hr removeformat | subscript superscript | visualblocks visualchars nonbreaking pagebreak | ltr rtl | wordcount fullscreen'
- ];
+ var plugins = 'autoresize accordion searchreplace visualblocks visualchars anchor code lists advlist fullscreen pagebreak table wordcount directionality image charmap link media nonbreaking help';
+ var toolbar = 'undo redo | bold italic underline strikethrough | insertfile image media template link anchor codesample | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | fontfamily fontsize blocks | pagebreak | charmap | fullscreen preview save print | ltr rtl'
// load and add to toolbar openmagePlugins
if (this.openmagePluginsOptions) {
@@ -69,16 +65,21 @@ tinyMceWysiwygSetup.prototype =
plugins = plugin.key + ' ' + plugins;
openmageToolbarButtons = plugin.key + ' ' + openmageToolbarButtons;
});
- toolbar[0] = openmageToolbarButtons + ' | ' + toolbar[0];
+ toolbar = openmageToolbarButtons + ' | ' + toolbar;
}
var settings = {
selector: this.selector,
config: this.config,
- menubar: false,
+ menu: {
+ insert: {
+ title: 'Insert',
+ items: 'image link media addcomment pageembed template codesample inserttable | openmagevariable openmagewidget | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents | insertdatetime'
+ }
+ },
+ menubar: 'file edit view insert format tools table help',
plugins: plugins,
toolbar: toolbar,
- toolbar_mode: 'scrolling',
language: this.config.lang,
paste_as_text: true,
file_picker_types: 'file image media',