Skip to content

Commit 2d4d766

Browse files
committed
AC-14602:Migrate from TinyMCE to Hugerte.org | Replace Tinymce
1 parent 3713e9d commit 2d4d766

File tree

254 files changed

+118625
-1069
lines changed

Some content is hidden

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

254 files changed

+118625
-1069
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ var config = {
88
shim: {
99
'chartjs/chartjs-adapter-moment': ['moment'],
1010
'chartjs/es6-shim.min': {},
11-
'tiny_mce_6/tinymce.min': {
12-
exports: 'tinyMCE'
11+
'hugerte/hugerte.min': {
12+
exports: 'hugerte',
13+
init: function() {
14+
window.tinymce = window.hugerte;
15+
return window.hugerte;
16+
}
1317
}
1418
},
1519
paths: {
@@ -28,7 +32,7 @@ var config = {
2832
buttonAdapter: 'Magento_Ui/js/form/button-adapter',
2933
chartJs: 'chartjs/Chart.min',
3034
'chart.js': 'chartjs/Chart.min',
31-
tinymce: 'tiny_mce_6/tinymce.min',
35+
'tinymce': 'hugerte/hugerte.min',
3236
wysiwygAdapter: 'mage/adminhtml/wysiwyg/tiny_mce/tinymceAdapter'
3337
}
3438
}

composer.json

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
"dealerdirect/phpcodesniffer-composer-installer": true,
1212
"laminas/laminas-dependency-plugin": true,
1313
"magento/*": true,
14-
"php-http/discovery": true,
15-
"magento/magento-composer-installer": true,
16-
"composer/installers": true
14+
"php-http/discovery": true
1715
},
1816
"preferred-install": "dist",
1917
"sort-packages": true
@@ -48,7 +46,6 @@
4846
"elasticsearch/elasticsearch": "^8.15",
4947
"ezyang/htmlpurifier": "^4.17",
5048
"guzzlehttp/guzzle": "^7.5",
51-
"hugerte/hugerte": "^1.0",
5249
"laminas/laminas-captcha": "^2.18",
5350
"laminas/laminas-code": "^4.13",
5451
"laminas/laminas-di": "^3.15",
@@ -357,9 +354,6 @@
357354
"scripts": {
358355
},
359356
"extra": {
360-
"installer-paths": {
361-
"lib/web/hugerte": ["hugerte/hugerte"]
362-
},
363357
"component_paths": {
364358
"trentrichardson/jquery-timepicker-addon": "lib/web/jquery/jquery-ui-timepicker-addon.js",
365359
"components/jquery": [
@@ -405,32 +399,5 @@
405399
"Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/"
406400
}
407401
},
408-
"prefer-stable": true,
409-
"repositories": [
410-
{
411-
"type": "package",
412-
"package": {
413-
"name": "hugerte/hugerte",
414-
"version": "1.0.9",
415-
"type": "magento2-component",
416-
"require": {
417-
"magento/magento-composer-installer": ">=0.4.0"
418-
},
419-
"source": {
420-
"url": "https://github.com/hugerte/hugerte-dist.git",
421-
"type": "git",
422-
"reference": "v1.0.9"
423-
},
424-
"dist": {
425-
"url": "https://github.com/hugerte/hugerte-dist/archive/refs/tags/v1.0.9.zip",
426-
"type": "zip"
427-
},
428-
"extra": {
429-
"map": [
430-
["*", "lib/web/hugerte/"]
431-
]
432-
}
433-
}
434-
}
435-
]
402+
"prefer-stable": true
436403
}

composer.lock

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

lib/web/hugerte/CHANGELOG.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## 1.0.9 - 2025-03-15
8+
9+
### Fixed
10+
- PrismJS license info has not been present in the codesample plugin files.
11+
12+
## 1.0.8 - 2025-03-11
13+
14+
### Fixed
15+
- Updated dependencies including those with security vulnerabilities.
16+
- Switched from a polynomial regular expression possibly creating a ReDoS vulnerabiliy to the native string trim method in hugerte.utils.Tools.trim.
17+
18+
## 1.0.7 - 2025-01-11
19+
20+
### Fixed
21+
- Fixed bundling HugeRTE together with a skin. (Tested with Vite/ES6 only.)
22+
- Dompurify license info has been present in files not containing Dompurify (e.g. plugins).
23+
24+
## 1.0.6 - 2024-12-20
25+
26+
### Fixed
27+
- Dompurify license info has not been present in the minified build.
28+
29+
## 1.0.5 - 2024-12-19
30+
31+
### Fixed
32+
- Fixed links to TinyMCE docs #GH-29
33+
34+
### Removed
35+
- Slimmed README.md. Docs are now in the separate hugerte/hugerte-docs repo.
36+
37+
## 1.0.4 - 2024-10-28
38+
39+
### Added
40+
- Copyright and license info has been added to the build header. #GH-27
41+
42+
### Fixed
43+
- The used dompurify version has been upgraded, fixing the issue that invalid HTML elements within an `svg` element weren't removed. #GH-26
44+
45+
## 1.0.3 - 2024-10-04
46+
47+
### Improved
48+
- Updated references to bad HugeRTE 1.0.0 build in README.md #GH-23
49+
50+
## 1.0.2 - 2024-10-04
51+
52+
### Fixed
53+
- The license field in composer.json was set to MIT-only instead of MIT. The `-only` prefix makes sense for GPL licenses but not MIT.
54+
55+
## 1.0.1 - 2024-10-04
56+
57+
### Improved
58+
- The package.json and composer.json files now include better metadata.
59+
60+
### Fixed
61+
- Wrong files were published at npm. #GH-23
62+
63+
## 1.0.0 - 2024-10-01
64+
65+
### Added
66+
- New custom tooltip functionality, tooltip will be shown when hovering with a mouse or with keyboard focus. #TINY-9275
67+
- New `sandbox_iframes_exclusions` option that holds a list of URL host names to be excluded from iframe sandboxing when `sandbox_iframes` is set to `true`. #TINY-10350
68+
- Added 'getAllEmojis' api function to the emoticons plugin #TINY-10572
69+
- Element preset support for the `valid_children` option and Schema.addValidChildren API. #TINY-9979
70+
- A new `trigger` property for block text pattern configurations, allowing pattern activation with either Space or Enter keys. #TINY-10324
71+
- Added onFocus callback for CustomEditor dialog component. #TINY-10596
72+
- Added icons for the import from Word, export to Word and export to PDF premium plugins. #TINY-10612
73+
- Added `data` to Schema as a valid element. #TINY-10611
74+
- More advanced schema config for custom elements. #TINY-9980
75+
- Added custom tooltip for autocompleter, now visible on both mouse hover and keyboard focus, except single column cases. #TINY-9638
76+
- Added importword, exportpdf and exportword menu items to default file menu. #TINY-10670
77+
78+
### Improved
79+
- Included keyboard shortcut in custom tooltip for `ToolbarButton` and `ToolbarToggleButton`. #TINY-10487
80+
- Improved showing which element has focus for keyboard navigation. #TINY-9176
81+
- Custom tooltips will now show for items in `collection` which is rendered inside a dialog, on mouse hover and keyboard focus. #TINY-9637
82+
- Autocompleter will now work with IMEs. #TINY-10637
83+
- Make table ghost element better reflect height changes when resizing. #TINY-10658
84+
85+
### Changed
86+
- `convert_unsafe_embeds` editor option is now defaulted to `true`. #TINY-10351
87+
- `sandbox_iframes` editor option is now defaulted to `true`. #TINY-10350
88+
- The DOMUtils.isEmpty API function has been modified to consider nodes containing only comments as empty. #TINY-10459
89+
- The `highlight_on_focus` option now defaults to true, adding a focus outline to every editor. #TINY-10574
90+
- Delay before the tooltip to show up, from 800ms to 300ms. #TINY-10475
91+
- Now `tox-view__pane` has `position: relative` instead of `static`. #TINY-10561
92+
- Update outbound link for statusbar Tiny logo #TINY-10494
93+
- Remove the height field from the `table` plugin cell dialog. The `table` plugin row dialog now controls the row height by setting the height on the `tr` element, not the `td` elements. #TINY-10617
94+
- Change table height resizing handling to remove heights from `td`/`th` elements and only apply to `tr` elements. #TINY-10589
95+
- Removed incorrect `aria-placeholder` attribute from editor body when `placeholder` option is set. #TINY-10452
96+
- The `tooltip` property for dialog's footer `togglebutton` is now optional. #TINY-10672
97+
- `TinyMCE`, `tinymce`, `Tinymce`, `TinyMce`, `tinyMCE`, `tinyMce` have been replaced by appropiate HugeRTE variants, especially the global `tinymce` object #GH-8
98+
99+
### Removed
100+
- Removed the deprecated `remove_trailing_brs` option from DomParser. #TINY-10454
101+
- Removed `title` attribute for buttons with visible label. #TINY-10453
102+
- Removed `InsertOrderedList` and `InsertUnorderedList` from core. #TINY-10644
103+
- Removed `closeButton` from `NotificationSpec`, close button in notification is now rendered by default. #TINY-10646
104+
- The autocompleter `ch` configuration property has been removed. Use the `trigger` property instead. #TINY-8929
105+
- The `promotion` init option has been removed. HugeRTE doesn't show an upgrade button regardless of it being present or not.
106+
107+
### Fixed
108+
- When deleting the last row in a table, the cursor would jump to the first cell (top left), instead of moving to the next adjacent cell in some cases. #TINY-6309
109+
- Heading formatting would be partially applied to the content within the `summary` element when the caret was positioned between words. #TINY-10312
110+
- Moving focus to the outside of the editor after having clicked a menu would not fire a `blur` event as expected. #TINY-10310
111+
- Autocomplete would sometimes cause corrupt data when starting during text composition. #TINY-10317
112+
- Inline mode with persisted toolbar would show regardless of the skin being loaded, causing css issues #TINY-10482
113+
- Table classes couldn't be removed via setting an empty value in `table_class_list`. Also fixed being forced to pick the first class option. #TINY-6653
114+
- Directly right clicking on a ol's li in FireFox didn't enable the button `List Properties...` in the context menu. #TINY-10490
115+
- The `link_default_target` option wasn't considered when inserting a link via `quicklink` toolbar. #TINY-10439
116+
- When inline editor toolbar wrapped to multiple lines the top wasn't always calculated correctly. #TINY-10580
117+
- Removed manually dispatching dragend event on drop in Firefox. #TINY-10389
118+
- Slovenian help dialog content had a dot in the wrong place. #TINY-10601
119+
- Pressing Backspace at the start of an empty `summary` element within a `details` element nested in a list item no longer removes the `summary` element. #TINY-10303
120+
- The toolbar width was miscalculated for the inline editor positioned inside a scrollable container. #TINY-10581
121+
- Fixed incorrect object processor for `event_root` option. #TINY-10433
122+
- Adding newline after using `selection.setContent` to insert a block element would throw an unhandled exception. #TINY-10560
123+
- Floating toolbar buttons in inline editor incorrectly wrapped into multiple rows on window resizing or zooming. #TINY-10570
124+
- When setting table border width and `table_style_by_css` is true, only the border attribute is set to 0 and border-width styling is no longer used #TINY-10308
125+

lib/web/hugerte/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# HugeRTE
2+
3+
The 100% free fork of the world's #1 open source rich text editor.
4+
5+
Used and trusted by millions of developers, [TinyMCE](https://github.com/tinymce/tinymce) (the original project we've forked) is the world’s most customizable, scalable, and flexible rich text editor. However, they changed the license of TinyMCE 7 to GPLv2+ (or a commercial license) while it has been MIT for TinyMCE 6 and LGPL for older versions. This creates problems for users (see [the discussion](https://github.com/tinymce/tinymce/issues/9453)) so a fork has been created here. It has originally been named HugeMCE, however, due to [potential trademark confusion with TinyMCE](https://github.com/hugerte/hugerte/issues/1#issuecomment-2373423311), it has been renamed to HugeRTE before its publishment to npm.
6+
7+
## Documentation
8+
9+
You can find the documentation [on the dedicated repo](https://github.com/hugerte/hugerte-docs).
10+
11+
## Demo
12+
13+
Visit the [HugeRTE website](https://hugerte.org) to quickly play around with the editor.
14+
15+
## License
16+
17+
[MIT](LICENSE.TXT)
18+
19+
## Compiling and contributing
20+
21+
In 2019 TinyMCE made the decision to transition their codebase to a monorepo. For information on compiling and contributing, see: [contribution guidelines](https://github.com/hugerte/hugerte/blob/master/CONTRIBUTING.md).

lib/web/hugerte/bower.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "hugerte",
3+
"description": "Web based JavaScript HTML WYSIWYG editor control.",
4+
"license": "MIT",
5+
"keywords": [
6+
"wysiwyg",
7+
"hugerte",
8+
"richtext",
9+
"javascript",
10+
"html",
11+
"text",
12+
"rich editor",
13+
"rich text editor",
14+
"rte",
15+
"rich text",
16+
"contenteditable",
17+
"editing"
18+
],
19+
"homepage": "https:/hugerte.org/",
20+
"ignore": [
21+
"README.md",
22+
"composer.json",
23+
"package.json",
24+
".npmignore",
25+
"CHANGELOG.md"
26+
]
27+
}

lib/web/hugerte/composer.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "hugerte/hugerte",
3+
"version": "1.0.9",
4+
"description": "Web based JavaScript HTML WYSIWYG editor control.",
5+
"license": [
6+
"MIT"
7+
],
8+
"keywords": [
9+
"wysiwyg",
10+
"hugerte",
11+
"richtext",
12+
"javascript",
13+
"html",
14+
"text",
15+
"rich editor",
16+
"rich text editor",
17+
"rte",
18+
"rich text",
19+
"contenteditable",
20+
"editing"
21+
],
22+
"homepage": "https://hugerte.org/",
23+
"type": "component",
24+
"extra": {
25+
"component": {
26+
"scripts": [
27+
"hugerte.js",
28+
"plugins/*/plugin.js",
29+
"themes/*/theme.js",
30+
"models/*/model.js",
31+
"icons/*/icons.js"
32+
],
33+
"files": [
34+
"hugerte.min.js",
35+
"plugins/*/plugin.min.js",
36+
"themes/*/theme.min.js",
37+
"models/*/model.min.js",
38+
"skins/**",
39+
"icons/*/icons.min.js"
40+
]
41+
}
42+
},
43+
"archive": {
44+
"exclude": [
45+
"README.md",
46+
"bower.js",
47+
"package.json",
48+
".npmignore",
49+
"CHANGELOG.md"
50+
]
51+
}
52+
}

0 commit comments

Comments
 (0)