Skip to content

Commit 08061cd

Browse files
authored
Merge pull request #9360 from magento-gl/AC-13289-latest
[Arrows] Platform Health Delivery
2 parents 88660e7 + 2dc71e6 commit 08061cd

File tree

178 files changed

+1084
-460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+1084
-460
lines changed

app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/MediaGallerySection.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2020 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -23,7 +23,7 @@
2323
<element name="UploadImageNew" type="file" selector="#upload_image"/>
2424
<element name="UploadImageSelector" type="file" selector="#fileUploader"/>
2525
<element name="UploadImageWithUploaderId" type="file" selector="#fileUploader + .uppy-Root .uppy-Dashboard-input"/>
26-
<element name="OkBtn" type="button" selector=".tox-dialog__footer button[aria-label='Save']"/>
26+
<element name="OkBtn" type="button" selector=".tox-dialog__footer button[title='Save']"/>
2727
<element name="insertBtn" type="button" selector="#insert"/>
2828
<element name="InsertFile" type="text" selector="#insert_files" timeout="30"/>
2929
<element name="CreateFolder" type="button" selector="#new_folder" timeout="30"/>

app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/TinyMCESection.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2020 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="TinyMCESection">
1111
<element name="checkIfContentTabOpen" type="button" selector="//span[text()='Content']/parent::strong/parent::*[@data-state-collapsible='closed']"/>
1212
<element name="CheckIfTabExpand" type="button" selector="//div[@data-state-collapsible='closed']//span[text()='Content']"/>
1313
<element name="TinyMCE" type="text" selector=".tox-tinymce"/>
1414
<element name="InsertWidgetBtn" type="button" selector=".action-add-widget"/>
15-
<element name="InsertWidgetIcon" type="button" selector="button[aria-label='Insert Widget']" timeout="30"/>
15+
<element name="InsertWidgetIcon" type="button" selector="button[title='Insert Widget']" timeout="30"/>
1616
<element name="InsertVariableBtn" type="button" selector=".scalable.add-variable.plugin"/>
17-
<element name="InsertVariableIcon" type="button" selector="button[aria-label='Insert Variable']"/>
17+
<element name="InsertVariableIcon" type="button" selector="button[title='Insert Variable']"/>
1818
<element name="InsertImageBtn" type="button" selector=".scalable.action-add-image.plugin"/>
19-
<element name="InsertImageIcon" type="button" selector="button[aria-label='Insert/edit image']" timeout="30"/>
20-
<element name="Style" type="button" selector="button[aria-label='Block Paragraph']"/>
21-
<element name="Bold" type="button" selector="button[aria-label='Bold']"/>
22-
<element name="Italic" type="button" selector="button[aria-label='Italic']"/>
23-
<element name="Underline" type="button" selector="button[aria-label='Underline']"/>
24-
<element name="AlignLeft" type="button" selector="button[aria-label='Align left']"/>
25-
<element name="AlignCenter" type="button" selector="button[aria-label='Align center']"/>
26-
<element name="AlignRight" type="button" selector="button[aria-label='Align right']"/>
27-
<element name="Bullet" type="button" selector="div[aria-label='Bullet list']"/>
28-
<element name="Numlist" type="button" selector="div[aria-label='Numbered list']"/>
29-
<element name="InsertLink" type="button" selector="button[aria-label='Insert/edit link']"/>
30-
<element name="InsertTable" type="button" selector="button[aria-label='Table']"/>
31-
<element name="SpecialCharacter" type="button" selector="button[aria-label='Special character']"/>
19+
<element name="InsertImageIcon" type="button" selector="button[title='Insert/edit image']" timeout="30"/>
20+
<element name="Style" type="button" selector="button[title='Block Paragraph']"/>
21+
<element name="Bold" type="button" selector="button[title='Bold']"/>
22+
<element name="Italic" type="button" selector="button[title='Italic']"/>
23+
<element name="Underline" type="button" selector="button[title='Underline']"/>
24+
<element name="AlignLeft" type="button" selector="button[title='Align left']"/>
25+
<element name="AlignCenter" type="button" selector="button[title='Align center']"/>
26+
<element name="AlignRight" type="button" selector="button[title='Align right']"/>
27+
<element name="Bullet" type="button" selector="div[title='Bullet list']"/>
28+
<element name="Numlist" type="button" selector="div[title='Numbered list']"/>
29+
<element name="InsertLink" type="button" selector="button[title='Insert/edit link']"/>
30+
<element name="InsertTable" type="button" selector="button[title='Table']"/>
31+
<element name="SpecialCharacter" type="button" selector="button[title='Special character']"/>
3232
<element name="WidgetButton" type="button" selector="span[class*='magento-widget mceNonEditable']"/>
3333
<element name="EditorContent" type="input" selector="#tinymce"/>
3434
<element name="Content" type="textarea" selector="textarea"/>

app/code/Magento/Cms/etc/adminhtml/di.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
4+
* Copyright 2014 Adobe
5+
* All Rights Reserved.
6+
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
99
<preference for="Magento\Ui\Component\Wysiwyg\ConfigInterface" type="Magento\Cms\Model\Wysiwyg\Config"/>
@@ -38,7 +38,7 @@
3838
<argument name="adapterOptions" xsi:type="array">
3939
<item name="tinymce" xsi:type="array">
4040
<item name="value" xsi:type="string">mage/adminhtml/wysiwyg/tiny_mce/tinymceAdapter</item>
41-
<item name="label" xsi:type="string" translatable="true">TinyMCE 7</item>
41+
<item name="label" xsi:type="string" translatable="true">TinyMCE 6</item>
4242
</item>
4343
</argument>
4444
</arguments>

app/code/Magento/Ui/view/base/requirejs-config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var config = {
88
shim: {
99
'chartjs/chartjs-adapter-moment': ['moment'],
1010
'chartjs/es6-shim.min': {},
11-
'tiny_mce_7/tinymce.min': {
11+
'tiny_mce_6/tinymce.min': {
1212
exports: 'tinyMCE'
1313
}
1414
},
@@ -28,7 +28,7 @@ var config = {
2828
buttonAdapter: 'Magento_Ui/js/form/button-adapter',
2929
chartJs: 'chartjs/Chart.min',
3030
'chart.js': 'chartjs/Chart.min',
31-
tinymce: 'tiny_mce_7/tinymce.min',
31+
tinymce: 'tiny_mce_6/tinymce.min',
3232
wysiwygAdapter: 'mage/adminhtml/wysiwyg/tiny_mce/tinymceAdapter'
3333
}
3434
}

dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/magento.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ lib/web/jquery/jstree/jquery.jstree.js
2020
// MINIFIED FILES
2121
app/code/**/*.min.js
2222
lib/web/legacy-build.min.js
23-
lib/web/tiny_mce_7/**/*.js
24-
lib/web/tiny_mce_7/***/*.js
23+
lib/web/tiny_mce_6/**/*.js
24+
lib/web/tiny_mce_6/***/*.js
2525
lib/web/jquery/uppy/dist/uppy.min.js
2626

2727
// TEST

dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
4+
* Copyright 2020 Adobe
5+
* All Rights Reserved.
6+
*/
77
-->
88
<!-- These are the settings for legacy testing of Magento 2 Community Edition -->
99
<config>
@@ -75,23 +75,23 @@
7575
<word>rma</word>
7676
</item>
7777
<item>
78-
<path>lib/web/tiny_mce_7/plugins/help/plugin.min.js</path>
78+
<path>lib/web/tiny_mce_6/plugins/help/plugin.min.js</path>
7979
<word>CHANGELOG</word>
8080
</item>
8181
<item>
82-
<path>lib/web/tiny_mce_7/plugins/emoticons/js/emojis.min.js</path>
82+
<path>lib/web/tiny_mce_6/plugins/emoticons/js/emojis.min.js</path>
8383
<word>Enterprise</word>
8484
</item>
8585
<item>
86-
<path>lib/web/tiny_mce_7/plugins/emoticons/js/emojis.js</path>
86+
<path>lib/web/tiny_mce_6/plugins/emoticons/js/emojis.js</path>
8787
<word>Enterprise</word>
8888
</item>
8989
<item>
90-
<path>lib/web/tiny_mce_7/plugins/emoticons/js/emojiimages.min.js</path>
90+
<path>lib/web/tiny_mce_6/plugins/emoticons/js/emojiimages.min.js</path>
9191
<word>Enterprise</word>
9292
</item>
9393
<item>
94-
<path>lib/web/tiny_mce_7/plugins/emoticons/js/emojiimages.js</path>
94+
<path>lib/web/tiny_mce_6/plugins/emoticons/js/emojiimages.js</path>
9595
<word>Enterprise</word>
9696
</item>
9797
<item>

lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymceAdapter.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@ define([
207207
toolbar: this.config.tinymce.toolbar,
208208
adapter: this,
209209
'body_id': 'html-body',
210-
license_key:'gpl',
211-
xss_sanitization: false,
210+
212211
/**
213212
* @param {Object} editor
214213
*/
@@ -405,16 +404,16 @@ define([
405404

406405
require(['mage/adminhtml/browser'], function () {
407406
MediabrowserUtility.openDialog(wUrl, false, false, typeTitle, {
408-
/**
407+
/**
409408
* Closed.
410409
*/
411-
closed: function () {
412-
frameDialog.show();
413-
jQuery('.tox-tinymce-aux').show();
414-
},
410+
closed: function () {
411+
frameDialog.show();
412+
jQuery('.tox-tinymce-aux').show();
413+
},
415414

416-
targetElementId: self.activeEditor() ? self.activeEditor().id : null
417-
}
415+
targetElementId: self.activeEditor() ? self.activeEditor().id : null
416+
}
418417
);
419418
});
420419
},
@@ -466,8 +465,6 @@ define([
466465

467466
this.getPluginButtons().hide();
468467

469-
tinyMCE.execCommand('mceAddControl', false, this.getId());
470-
471468
return this;
472469
},
473470

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

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

@@ -692,10 +691,11 @@ define([
692691
decodeDirectives: function (content) {
693692
var directiveUrl = this.makeDirectiveUrl('%directive%').split('?')[0], // remove query string from directive
694693
// escape special chars in directives url to use in regular expression
694+
// eslint-disable-next-line no-useless-escape
695695
regexEscapedDirectiveUrl = directiveUrl.replace(/([$^.?*!+:=()\[\]{}|\\])/g, '\\$1'),
696696
regexDirectiveUrl = regexEscapedDirectiveUrl
697697
.replace(
698-
'%directive%',
698+
'%directive%',// eslint-disable-next-line no-useless-escape
699699
'([a-zA-Z0-9,_-]+(?:%2[A-Z]|)+\/?)(?:(?!").)*'
700700
) + '/?(\\\\?[^"]*)?', // allow optional query string
701701
reg = new RegExp(regexDirectiveUrl);

lib/web/tiny_mce_6/icons/default/icons.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/web/tiny_mce_6/license.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

lib/web/tiny_mce_6/models/dom/model.min.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)