MDL-81663 editor_tiny: Updates to core for tiny upgrade
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -323,6 +323,11 @@ const getStandardConfig = (target, tinyMCE, options, plugins) => {
|
||||
// eslint-disable-next-line camelcase
|
||||
browser_spellcheck: true,
|
||||
|
||||
// Set the license_key to gpl.
|
||||
// https://www.tiny.cloud/docs/tinymce/latest/license-key/
|
||||
// eslint-disable-next-line camelcase
|
||||
license_key: 'gpl',
|
||||
|
||||
setup: (editor) => {
|
||||
Options.register(editor, options);
|
||||
|
||||
|
||||
@@ -440,14 +440,6 @@ class manager {
|
||||
'tabledeleterow' => 'table',
|
||||
],
|
||||
],
|
||||
'template' => [
|
||||
'buttons' => [
|
||||
'template',
|
||||
],
|
||||
'menuitems' => [
|
||||
'template' => 'insert',
|
||||
],
|
||||
],
|
||||
'visualblocks' => [
|
||||
'buttons' => [
|
||||
'visualblocks',
|
||||
@@ -492,9 +484,6 @@ class manager {
|
||||
// Use the Moodle autosave plugin instead.
|
||||
'autosave',
|
||||
|
||||
// Disable the Template plugin for now.
|
||||
'template',
|
||||
|
||||
// Disable the preview plugin as it does not support Moodle filters.
|
||||
'preview',
|
||||
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
# This is a description for the TinyMCE 6 library integration with Moodle.
|
||||
# This is a description for the TinyMCE 7 library integration with Moodle.
|
||||
|
||||
Please note that we have a clone of the official TinyMCE repository which contains the working build and branch for each release. This ensures build repeatability and gives us the ability to patch stable versions of Moodle for security fixes where relevant.
|
||||
|
||||
Each Moodle branch has a similar branch in the https://github.com/moodlehq/tinymce.
|
||||
The Moodle `master` branch is named as the upcoming STABLE branch name, for example during the development of Moodle 4.2.0, the upcoming STABLE branch name will be MOODLE_402_STABLE.
|
||||
The Moodle `master` branch is named as the upcoming STABLE branch name, for example during the development of Moodle 4.5.0, the upcoming STABLE branch name will be MOODLE_405_STABLE.
|
||||
|
||||
## Patches included in this release
|
||||
|
||||
- MDL-78714: Add support for disabling XSS Sanitisation (TINY-9600)
|
||||
|
||||
Please note: TinyMCE issue numbers are related to bugs in their private issue
|
||||
tracker. See git history of their repository for relevant information.
|
||||
N/A
|
||||
|
||||
## Upgrade procedure for TinyMCE Editor
|
||||
|
||||
@@ -27,7 +24,7 @@ tinymce=`mktemp -d`
|
||||
cd "${tinymce}"
|
||||
git clone https://github.com/tinymce/tinymce.git
|
||||
cd tinymce
|
||||
git checkout -b MOODLE_404_STABLE
|
||||
git checkout -b MOODLE_405_STABLE
|
||||
git reset --hard [desired version]
|
||||
```
|
||||
|
||||
@@ -62,16 +59,16 @@ cp -r modules/tinymce/js "${MOODLEDIR}/js"
|
||||
|
||||
```
|
||||
# Tag the next Moodle version.
|
||||
git tag v4.2.0
|
||||
git tag v4.5.0
|
||||
git remote add moodlehq --tags
|
||||
git push moodlehq MOODLE_402_STABLE
|
||||
git push moodlehq MOODLE_405_STABLE
|
||||
```
|
||||
|
||||
9. Check the (Release notes)[https://www.tiny.cloud/docs/tinymce/6/release-notes/] for any new plugins, premium plugins, menu items, or buttons and add them to classes/manager.php
|
||||
9. Check the (Release notes)[https://www.tiny.cloud/docs/tinymce/7/release-notes/] for any new plugins, premium plugins, menu items, or buttons and add them to classes/manager.php
|
||||
|
||||
## Update procedure for included TinyMCE translations
|
||||
|
||||
1. Visit https://www.tiny.cloud/get-tiny/language-packages/ and download the "TinyMCE 6 All languages" zip file.
|
||||
1. Visit https://www.tiny.cloud/get-tiny/language-packages/ and download the "TinyMCE 7 All languages" zip file.
|
||||
2. Check the list of languages and confirm that the German translation is still at 100%. If not, then make a note of a language which is.
|
||||
3. Unzip the translation into a new directory:
|
||||
|
||||
@@ -130,7 +127,7 @@ git clone https://github.com/tinymce/tinymce.git
|
||||
cd tinymce
|
||||
git remote add moodlehq https://github.com/moodlehq/tinymce
|
||||
git fetch moodlehq
|
||||
git checkout -b MOODLE_402_STABLE moodlehq/MOODLE_402_STABLE
|
||||
git checkout -b MOODLE_405_STABLE moodlehq/MOODLE_405_STABLE
|
||||
```
|
||||
|
||||
3. Apply any necessary security patches.
|
||||
|
||||
@@ -170,7 +170,7 @@ class behat_editor_tiny extends behat_base implements \core_behat\settable_edito
|
||||
$firstlink->mouseover();
|
||||
|
||||
// Now match by title where the role matches any menuitem, or menuitemcheckbox, or menuitem*.
|
||||
$link = $openmenu->find('css', "[title='{$menuitem}'][role^='menuitem']");
|
||||
$link = $openmenu->find('css', "[aria-label='{$menuitem}'][role^='menuitem']");
|
||||
$this->execute('behat_general::i_click_on', [$link, 'NodeElement']);
|
||||
}
|
||||
}
|
||||
@@ -301,7 +301,7 @@ class behat_editor_tiny extends behat_base implements \core_behat\settable_edito
|
||||
return;
|
||||
}
|
||||
|
||||
if ($button->getAttribute(('aria-pressed')) === 'false') {
|
||||
if ($button->getAttribute(('aria-expanded')) === 'false') {
|
||||
$this->execute('behat_general::i_click_on', [$button, 'NodeElement']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user