-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[BB-6151] feat: upgrades tinyMCE v4.0.20 to tinyMCE v5.5.1 #30335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Agrendalath
merged 14 commits into
openedx:master
from
open-craft:DubeySandeep/tinymce_upgrade
Sep 19, 2022
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4e6ec24
feat: upgrades tinyMCE4 to tinyMCE5
DubeySandeep 9f0037c
feat: adds new skin studio-tmce5 similar to studio-tmce4
DubeySandeep f2ebc33
fix: prevent tinymce from breaking on optimised builds
tecoholic 18f822d
fix: update the CodeMirror plugin to use iframe messaging
tecoholic 078eeda
refactor: replace CodeMirror addons files with codemirror-compressed …
tecoholic f6f2fc9
docs: update BUILD_README with working instructions for bundling
tecoholic ca8a45b
docs: update instructions for compressing code-mirror plugin
tecoholic 992ca57
fix: validate message origin in codemirror source.html
tecoholic 527b443
fix: remove unnecssary code in the codemirror plugin
tecoholic 11f35c0
docs: remove outdated note from build instructions
tecoholic 40ca489
refactor: rename BUILD_README from txt to md
tecoholic e267594
temp: set the ora version to PR version for testing
tecoholic 688e425
refactor: regenerate the tinymce.full.min.js using LC_ALL set to C
tecoholic 6b976bf
chore: update ora2 requirement version to 4.5.0
tecoholic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Instructions for updating tinymce to a newer version: | ||
|
|
||
| 1. Download the desired version from https://github.com/tinymce/tinymce/tags | ||
| 2. If it’s a major update, follow the official migration doc and update the codebase as needed. | ||
| 3. Setup the codemirror-plugin as per the instruction below. | ||
| 4. Find all the EDX specific changes in the currently used version of tinymce by searching for the string "EDX" in the vendor/js/tinymce dir. | ||
| 5. Merge the EDX specific changes with the newly downloaded version. | ||
| 6. Follow the instructions given below to create the new version of js/tinymce.full.min.js | ||
|
|
||
| # Instruction for setting codemirror-plugin | ||
|
|
||
| 1. Download the tinymce-codemirror-plugin from https://gitlab.com/tinymce-plugins/tinymce-codemirror | ||
| 2. Open terminal in the downloaded plugin directory and run the following commands: | ||
| ``` | ||
| npm install | ||
| npm run prepublish (This command will generate the minified file in the plugin directory) | ||
| ``` | ||
| 3. Remove the tinymce-codemirror/plugins/codemirror/codemirror-4.8 directory | ||
| 4. Move the tinymce-codemirror/plugins directory to `common/static/js/vendor/tinymce/js/plugins/` directory. | ||
| 5. Apply EDX specific changes in the existing code to the `plugin.js` and `source.html` files. | ||
| 6. Install [uglify-js](https://www.npmjs.com/package/uglify-js) and generate `plugin.min.js` | ||
| ``` | ||
| cd common/static/js/vendor/tinymce/js/plugins/codemirror/ | ||
| uglify plugin.js -m -o plugin.min.js | ||
Agrendalath marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
| **IMPORTANT NOTE:** Regenerate the `tinymce.full.min.js` bundle everytime the code-mirror `plugin.min.js` is regenerated to ensure the latest changes are added to the bundle. | ||
|
|
||
| # Instructions for creating js/tinymce.full.min.js | ||
|
|
||
| The following uses the version 5.5.1 as a reference. Change your filenames depending the version you have downloaded. | ||
|
|
||
| 1. Unzip the zip file downloaded from Github. | ||
| ``` | ||
| unzip tinymce-5.5.1.zip | ||
| ``` | ||
| 2. Open terminal and change directory to the newly downloaded tinymce. | ||
| ``` | ||
| cd tinymce-5.5.1 | ||
| ``` | ||
| 3. Build TinyMCE using Yarn. this will create multiple zip files in the `dist` directory. | ||
| ``` | ||
| yarn && yarn build | ||
| ``` | ||
| 4. Unzip the dev bundle to the edx-platform's vendor directory. | ||
| ``` | ||
| unzip dist/tinymce_5.5.1_dev.zip -d /path/to/edx-platform/common/static/js/vendor/ | ||
| ``` | ||
| 5. Remove the unnecessary files in `/path/to/edx-platform/common/static/js/vendor/tinymce` like `package.json`, `yarn.lock`...etc., | ||
| 6. Generate a bundled version of the TinyMCE with all the plugins using the following command | ||
| ``` | ||
| cd common/static/js/vendor/tinymce/js/tinymce | ||
| LC_ALL=C cat tinymce.min.js */*/*.min.js plugins/emoticons/js/emojis.min.js > tinymce.full.min.js | ||
| ``` | ||
This file was deleted.
Oops, something went wrong.
256 changes: 0 additions & 256 deletions
256
common/static/js/vendor/tinymce/js/tinymce/classes/AddOnManager.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.