Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 1... Línea 1...
1
# This is a description for the TinyMCE 6 library integration with Moodle.
1
# This is a description for the TinyMCE 7 library integration with Moodle.
Línea 2... Línea 2...
2
 
2
 
Línea 3... Línea 3...
3
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.
3
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.
4
 
4
 
Línea 5... Línea 5...
5
Each Moodle branch has a similar branch in the https://github.com/moodlehq/tinymce.
5
Each Moodle branch has a similar branch in the https://github.com/moodlehq/tinymce.
Línea 6... Línea -...
6
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.
-
 
7
 
6
The Moodle `main` 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.
8
## Patches included in this release
-
 
9
 
-
 
Línea 10... Línea 7...
10
- MDL-78714: Add support for disabling XSS Sanitisation (TINY-9600)
7
 
Línea 11... Línea 8...
11
 
8
## Patches included in this release
Línea 12... Línea 9...
12
Please note: TinyMCE issue numbers are related to bugs in their private issue
9
 
13
tracker. See git history of their repository for relevant information.
10
N/A
14
 
11
 
Línea 15... Línea 12...
15
## Upgrade procedure for TinyMCE Editor
12
## Upgrade procedure for TinyMCE Editor
Línea 16... Línea 13...
16
 
13
 
17
1. Store an environment variable to the Tiny directory in the Moodle repository (the current directory).
14
1. Store an environment variable to the Tiny directory in the Moodle repository (the current directory).
18
 
15
 
19
 ```
16
 ```
20
MOODLEDIR=`pwd`/../../
17
MOODLEDIR=/your_moodle_dir/lib/editor/tiny
21
 ```
18
 ```
22
 
19
 
23
2. Check out a clean copy of TinyMCE of the target version.
20
2. Check out a clean copy of TinyMCE of the target version.
Línea 24... Línea 21...
24
 
21
 
Línea 49... Línea 46...
49
 ```
46
 ```
50
yarn
47
yarn
51
yarn build
48
yarn build
52
 ```
49
 ```
Línea -... Línea 50...
-
 
50
 
-
 
51
Note: If you encounter a problem during the build, please check your node version.
-
 
52
The latest node version that worked for this build was v21.
53
 
53
 
Línea 54... Línea 54...
54
7. Remove the old TinyMCE configuration and replace it with the newly built version.
54
7. Remove the old TinyMCE configuration and replace it with the newly built version.
55
 
55
 
56
 ```
56
 ```
Línea 60... Línea 60...
60
 
60
 
Línea 61... Línea 61...
61
8. Push the build to MoodleHQ for future change support
61
8. Push the build to MoodleHQ for future change support
62
 
62
 
63
 ```
63
 ```
64
# Tag the next Moodle version.
64
# Tag the next Moodle version.
65
git tag v4.2.0
65
git tag v4.5.0
66
git remote add moodlehq --tags
66
git remote add moodlehq --tags
Línea 67... Línea 67...
67
git push moodlehq MOODLE_402_STABLE
67
git push moodlehq MOODLE_405_STABLE
Línea 68... Línea 68...
68
 ```
68
 ```
Línea 69... Línea 69...
69
 
69
 
70
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
70
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
71
 
71
 
Línea 72... Línea 72...
72
## Update procedure for included TinyMCE translations
72
## Update procedure for included TinyMCE translations
73
 
73
 
Línea 100... Línea 100...
100
 ```
100
 ```
101
sed -i "/string\['tiny:/d" "${MOODLEDIR}/lang/en/editor_tiny.php"
101
sed -i "/string\['tiny:/d" "${MOODLEDIR}/lang/en/editor_tiny.php"
102
cat strings.php >> "${MOODLEDIR}/lang/en/editor_tiny.php"
102
cat strings.php >> "${MOODLEDIR}/lang/en/editor_tiny.php"
103
 ```
103
 ```
Línea -... Línea 104...
-
 
104
 
-
 
105
7. Review the changes to the language strings file carefully. You may need to:
-
 
106
 
104
 
107
    * Edit new strings so they meet [Moodle's guidelines for language strings](https://moodledev.io/general/development/policies/codingstyle#language-strings).
-
 
108
    * Revert changes to any Moodle-updated language strings that were fixed for spelling, grammar, and consistency in past releases to meet Moodle's guidelines. For example, from the [`en_fix` issues](https://tracker.moodle.org/issues/?jql=summary%20~%20%22en_fix%22%20order%20by%20createdDate%20desc). Review the `git` history of the language strings file to verify.
-
 
109
 
-
 
110
8. Commit the changes.
105
7. Commit changes. Note: You may need to review individual language changes which do not meet Moodle's guidelines.
111
 
Línea 106... Línea 112...
106
8. If required, the remaining language strings can be fed into AMOS.
112
9. If required, the remaining language strings can be fed into AMOS.
Línea 107... Línea 113...
107
 
113
 
Línea 108... Línea -...
108
---
-
 
109
 
-
 
110
**Note:** A set of language files are also generated for all supported translations and may be submitted to AMOS if desired.
114
---
Línea 111... Línea 115...
111
 
115
 
Línea 112... Línea 116...
112
**Note:** You will need to manually check for any Moodle-updated language strings as part of this change (for example any from the en_fixes).
116
**Note:** A set of language files are also generated for all supported translations and may be submitted to AMOS if desired.
Línea 113... Línea 117...
113
 
117
 
114
---
118
---
115
 
119
 
Línea 116... Línea 120...
116
## Security fix procedure for TinyMCE Editor
120
## Security fix procedure for TinyMCE Editor
Línea 117... Línea 121...
117
 
121
 
Línea 128... Línea 132...
128
cd "${tinymce}"
132
cd "${tinymce}"
129
git clone https://github.com/tinymce/tinymce.git
133
git clone https://github.com/tinymce/tinymce.git
130
cd tinymce
134
cd tinymce
131
git remote add moodlehq https://github.com/moodlehq/tinymce
135
git remote add moodlehq https://github.com/moodlehq/tinymce
132
git fetch moodlehq
136
git fetch moodlehq
133
git checkout -b MOODLE_402_STABLE moodlehq/MOODLE_402_STABLE
137
git checkout -b MOODLE_405_STABLE moodlehq/MOODLE_405_STABLE
134
 ```
138
 ```
Línea 135... Línea 139...
135
 
139
 
136
3. Apply any necessary security patches.
140
3. Apply any necessary security patches.
Línea 137... Línea 141...
137
4. Rebuild TinyMCE
141
4. Rebuild TinyMCE
138
 
142
 
139
 ```
143
 ```
140
yarn
144
yarn
Línea -... Línea 145...
-
 
145
yarn build
-
 
146
 ```
-
 
147
 
141
yarn build
148
Note: If you encounter a problem during the build, please check your node version.
Línea 142... Línea 149...
142
 ```
149
The latest node version that worked for this build was v21.
143
 
150
 
144
5. Remove the old TinyMCE configuration and replace it with the newly built version.
151
5. Remove the old TinyMCE configuration and replace it with the newly built version.