Skip to content

Commit

Permalink
Merge pull request #9360 from magento-gl/AC-13289-latest
Browse files Browse the repository at this point in the history
[Arrows] Platform Health Delivery
  • Loading branch information
sidolov authored Dec 3, 2024
2 parents 88660e7 + 2dc71e6 commit 08061cd
Show file tree
Hide file tree
Showing 178 changed files with 1,084 additions and 460 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2020 Adobe
* All Rights Reserved.
*/
-->
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -23,7 +23,7 @@
<element name="UploadImageNew" type="file" selector="#upload_image"/>
<element name="UploadImageSelector" type="file" selector="#fileUploader"/>
<element name="UploadImageWithUploaderId" type="file" selector="#fileUploader + .uppy-Root .uppy-Dashboard-input"/>
<element name="OkBtn" type="button" selector=".tox-dialog__footer button[aria-label='Save']"/>
<element name="OkBtn" type="button" selector=".tox-dialog__footer button[title='Save']"/>
<element name="insertBtn" type="button" selector="#insert"/>
<element name="InsertFile" type="text" selector="#insert_files" timeout="30"/>
<element name="CreateFolder" type="button" selector="#new_folder" timeout="30"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2020 Adobe
* All Rights Reserved.
*/
-->
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="TinyMCESection">
<element name="checkIfContentTabOpen" type="button" selector="//span[text()='Content']/parent::strong/parent::*[@data-state-collapsible='closed']"/>
<element name="CheckIfTabExpand" type="button" selector="//div[@data-state-collapsible='closed']//span[text()='Content']"/>
<element name="TinyMCE" type="text" selector=".tox-tinymce"/>
<element name="InsertWidgetBtn" type="button" selector=".action-add-widget"/>
<element name="InsertWidgetIcon" type="button" selector="button[aria-label='Insert Widget']" timeout="30"/>
<element name="InsertWidgetIcon" type="button" selector="button[title='Insert Widget']" timeout="30"/>
<element name="InsertVariableBtn" type="button" selector=".scalable.add-variable.plugin"/>
<element name="InsertVariableIcon" type="button" selector="button[aria-label='Insert Variable']"/>
<element name="InsertVariableIcon" type="button" selector="button[title='Insert Variable']"/>
<element name="InsertImageBtn" type="button" selector=".scalable.action-add-image.plugin"/>
<element name="InsertImageIcon" type="button" selector="button[aria-label='Insert/edit image']" timeout="30"/>
<element name="Style" type="button" selector="button[aria-label='Block Paragraph']"/>
<element name="Bold" type="button" selector="button[aria-label='Bold']"/>
<element name="Italic" type="button" selector="button[aria-label='Italic']"/>
<element name="Underline" type="button" selector="button[aria-label='Underline']"/>
<element name="AlignLeft" type="button" selector="button[aria-label='Align left']"/>
<element name="AlignCenter" type="button" selector="button[aria-label='Align center']"/>
<element name="AlignRight" type="button" selector="button[aria-label='Align right']"/>
<element name="Bullet" type="button" selector="div[aria-label='Bullet list']"/>
<element name="Numlist" type="button" selector="div[aria-label='Numbered list']"/>
<element name="InsertLink" type="button" selector="button[aria-label='Insert/edit link']"/>
<element name="InsertTable" type="button" selector="button[aria-label='Table']"/>
<element name="SpecialCharacter" type="button" selector="button[aria-label='Special character']"/>
<element name="InsertImageIcon" type="button" selector="button[title='Insert/edit image']" timeout="30"/>
<element name="Style" type="button" selector="button[title='Block Paragraph']"/>
<element name="Bold" type="button" selector="button[title='Bold']"/>
<element name="Italic" type="button" selector="button[title='Italic']"/>
<element name="Underline" type="button" selector="button[title='Underline']"/>
<element name="AlignLeft" type="button" selector="button[title='Align left']"/>
<element name="AlignCenter" type="button" selector="button[title='Align center']"/>
<element name="AlignRight" type="button" selector="button[title='Align right']"/>
<element name="Bullet" type="button" selector="div[title='Bullet list']"/>
<element name="Numlist" type="button" selector="div[title='Numbered list']"/>
<element name="InsertLink" type="button" selector="button[title='Insert/edit link']"/>
<element name="InsertTable" type="button" selector="button[title='Table']"/>
<element name="SpecialCharacter" type="button" selector="button[title='Special character']"/>
<element name="WidgetButton" type="button" selector="span[class*='magento-widget mceNonEditable']"/>
<element name="EditorContent" type="input" selector="#tinymce"/>
<element name="Content" type="textarea" selector="textarea"/>
Expand Down
8 changes: 4 additions & 4 deletions app/code/Magento/Cms/etc/adminhtml/di.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
* Copyright 2014 Adobe
* All Rights Reserved.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Ui\Component\Wysiwyg\ConfigInterface" type="Magento\Cms\Model\Wysiwyg\Config"/>
Expand Down Expand Up @@ -38,7 +38,7 @@
<argument name="adapterOptions" xsi:type="array">
<item name="tinymce" xsi:type="array">
<item name="value" xsi:type="string">mage/adminhtml/wysiwyg/tiny_mce/tinymceAdapter</item>
<item name="label" xsi:type="string" translatable="true">TinyMCE 7</item>
<item name="label" xsi:type="string" translatable="true">TinyMCE 6</item>
</item>
</argument>
</arguments>
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Ui/view/base/requirejs-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var config = {
shim: {
'chartjs/chartjs-adapter-moment': ['moment'],
'chartjs/es6-shim.min': {},
'tiny_mce_7/tinymce.min': {
'tiny_mce_6/tinymce.min': {
exports: 'tinyMCE'
}
},
Expand All @@ -28,7 +28,7 @@ var config = {
buttonAdapter: 'Magento_Ui/js/form/button-adapter',
chartJs: 'chartjs/Chart.min',
'chart.js': 'chartjs/Chart.min',
tinymce: 'tiny_mce_7/tinymce.min',
tinymce: 'tiny_mce_6/tinymce.min',
wysiwygAdapter: 'mage/adminhtml/wysiwyg/tiny_mce/tinymceAdapter'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ lib/web/jquery/jstree/jquery.jstree.js
// MINIFIED FILES
app/code/**/*.min.js
lib/web/legacy-build.min.js
lib/web/tiny_mce_7/**/*.js
lib/web/tiny_mce_7/***/*.js
lib/web/tiny_mce_6/**/*.js
lib/web/tiny_mce_6/***/*.js
lib/web/jquery/uppy/dist/uppy.min.js

// TEST
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
* Copyright 2020 Adobe
* All Rights Reserved.
*/
-->
<!-- These are the settings for legacy testing of Magento 2 Community Edition -->
<config>
Expand Down Expand Up @@ -75,23 +75,23 @@
<word>rma</word>
</item>
<item>
<path>lib/web/tiny_mce_7/plugins/help/plugin.min.js</path>
<path>lib/web/tiny_mce_6/plugins/help/plugin.min.js</path>
<word>CHANGELOG</word>
</item>
<item>
<path>lib/web/tiny_mce_7/plugins/emoticons/js/emojis.min.js</path>
<path>lib/web/tiny_mce_6/plugins/emoticons/js/emojis.min.js</path>
<word>Enterprise</word>
</item>
<item>
<path>lib/web/tiny_mce_7/plugins/emoticons/js/emojis.js</path>
<path>lib/web/tiny_mce_6/plugins/emoticons/js/emojis.js</path>
<word>Enterprise</word>
</item>
<item>
<path>lib/web/tiny_mce_7/plugins/emoticons/js/emojiimages.min.js</path>
<path>lib/web/tiny_mce_6/plugins/emoticons/js/emojiimages.min.js</path>
<word>Enterprise</word>
</item>
<item>
<path>lib/web/tiny_mce_7/plugins/emoticons/js/emojiimages.js</path>
<path>lib/web/tiny_mce_6/plugins/emoticons/js/emojiimages.js</path>
<word>Enterprise</word>
</item>
<item>
Expand Down
24 changes: 12 additions & 12 deletions lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymceAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ define([
toolbar: this.config.tinymce.toolbar,
adapter: this,
'body_id': 'html-body',
license_key:'gpl',
xss_sanitization: false,

/**
* @param {Object} editor
*/
Expand Down Expand Up @@ -405,16 +404,16 @@ define([

require(['mage/adminhtml/browser'], function () {
MediabrowserUtility.openDialog(wUrl, false, false, typeTitle, {
/**
/**
* Closed.
*/
closed: function () {
frameDialog.show();
jQuery('.tox-tinymce-aux').show();
},
closed: function () {
frameDialog.show();
jQuery('.tox-tinymce-aux').show();
},

targetElementId: self.activeEditor() ? self.activeEditor().id : null
}
targetElementId: self.activeEditor() ? self.activeEditor().id : null
}
);
});
},
Expand Down Expand Up @@ -466,8 +465,6 @@ define([

this.getPluginButtons().hide();

tinyMCE.execCommand('mceAddControl', false, this.getId());

return this;
},

Expand Down Expand Up @@ -669,11 +666,13 @@ define([
*/
encodeDirectives: function (content) {
// collect all HTML tags with attributes that contain directives
// eslint-disable-next-line no-useless-escape
return content.gsub(/<([a-z0-9\-\_]+[^>]+?)([a-z0-9\-\_]+="[^"]*?\{\{.+?\}\}.*?".*?)>/i, function (match) {
var attributesString = match[2],
decodedDirectiveString;

// process tag attributes string
// eslint-disable-next-line no-useless-escape
attributesString = attributesString.gsub(/([a-z0-9\-\_]+)="(.*?)(\{\{.+?\}\})(.*?)"/i, function (m) {
decodedDirectiveString = encodeURIComponent(Base64.mageEncode(m[3].replace(/&quot;/g, '"') + m[4]));

Expand All @@ -692,10 +691,11 @@ define([
decodeDirectives: function (content) {
var directiveUrl = this.makeDirectiveUrl('%directive%').split('?')[0], // remove query string from directive
// escape special chars in directives url to use in regular expression
// eslint-disable-next-line no-useless-escape
regexEscapedDirectiveUrl = directiveUrl.replace(/([$^.?*!+:=()\[\]{}|\\])/g, '\\$1'),
regexDirectiveUrl = regexEscapedDirectiveUrl
.replace(
'%directive%',
'%directive%',// eslint-disable-next-line no-useless-escape
'([a-zA-Z0-9,_-]+(?:%2[A-Z]|)+\/?)(?:(?!").)*'
) + '/?(\\\\?[^"]*)?', // allow optional query string
reg = new RegExp(regexDirectiveUrl);
Expand Down
1 change: 1 addition & 0 deletions lib/web/tiny_mce_6/icons/default/icons.min.js

Large diffs are not rendered by default.

File renamed without changes.
21 changes: 21 additions & 0 deletions lib/web/tiny_mce_6/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 4 additions & 0 deletions lib/web/tiny_mce_6/models/dom/model.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 08061cd

Please sign in to comment.