Skip to content

Commit f3bf5d6

Browse files
authored
Merge pull request #143 from modxcms/tiny6
Tiny6
2 parents 220ea2c + 7f7b6c7 commit f3bf5d6

File tree

178 files changed

+5138
-26150
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

+5138
-26150
lines changed

.babelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"plugins": ["add-module-exports"],
3+
"presets": [
4+
["@babel/preset-env", { "targets": "> 0.25%, not dead" }]
5+
]
6+
}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ nbproject
3131
ehthumbs.db
3232
Thumbs.db
3333
node_modules
34+
35+
# Packages #
36+
############
37+
_packages

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

README.md

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,25 @@
11
# TinyMCE Rich Text Editor
22

3-
TinyMCE 5 for MODX Revolution
3+
TinyMCE 6 for MODX Revolution
44

55
## Features
66

77
TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor. It
88
allows non-technical users to format content without knowing how to code. This
9-
package is based on the TinyMCE 5.
9+
package is based on the TinyMCE 6.
1010

1111
To build and install the package from source you have to use [Git Package
12-
Management](https://github.com/TheBoxer/Git-Package-Management). The GitHub
12+
Management (GPM)](https://github.com/TheBoxer/Git-Package-Management). The GitHub
1313
repository of TinyMCE Rich Text Editor contains a
14-
[config.json](https://github.com/modxcms/tinymce-rte/blob/tinymce5/_build/config.json)
14+
[config.json](https://github.com/modxcms/tinymce-rte/blob/main/_build/config.json)
1515
to build that package locally. Use this option, if you want to debug TinyMCE
1616
Rich Text Editor and/or contribute bugfixes and enhancements.
1717

18-
To update the TinyMCE core, you have to change the `tinymce_version` property in
19-
the `gulpfile.js` and run the `gulp update` task afterwards. This task will
20-
prepare all needed files in `assets/components/tinymcerte`. Please check, wether
21-
the TinyMCE image and link plugins are changed in the new version of TinyMCE and
22-
adopt the changes in the `src/modx/plugins` files and run the `gulp prepare`
23-
task afterwards.
24-
25-
To modify the MODX skin, you have to open the [TinyMCE 5 Skin
26-
Tool](http://skin.tiny.cloud/t5/) and upload the current
27-
[skintool.json](https://github.com/modxcms/tinymce-rte/blob/tinymce5/src/modx/skintool.json).
28-
After modifying the skin, you must click on `Get Skin` and replace the skin
29-
folder in the src/modx folder with the extracted downloaded skin folder. Then
30-
you should run the `gulp update` task. This task will prepare all needed files
31-
in `assets/components/tinymcerte`.
32-
33-
There is a `gulp prepare-debug` task, that copies not uglyfied script files to
34-
`assets/components/tinymcerte`.
18+
To update the plugin run `npm install` to install the dependencies. Run
19+
`npm run build` to build the plugin. The source files are located in the `/src/`
20+
directory. The package is compiled using Node 20.
21+
22+
To update the TinyMCE core, you have to change the `tinymcerte.tiny_url` system setting.
3523

3624
## Change Log
3725
https://github.com/modxcms/tinymce-rte/blob/master/core/components/tinymcerte/docs/changelog.md

_build/config.json

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "TinyMCE Rich Text Editor",
33
"lowCaseName": "tinymcerte",
4-
"description": "TinyMCE 5",
4+
"description": "TinyMCE 6",
55
"author": "John Peca/Thomas Jakobi",
6-
"version": "2.1.1",
6+
"version": "3.0.0",
77
"package": {
88
"elements": {
99
"plugins": [
@@ -23,7 +23,7 @@
2323
"systemSettings": [
2424
{
2525
"key": "plugins",
26-
"value": "autoresize advlist autolink lists charmap print preview anchor visualblocks searchreplace code fullscreen insertdatetime media table paste modxlink modximage modai",
26+
"value": "advlist autoresize autolink lists charmap preview anchor visualblocks searchreplace code fullscreen insertdatetime media table image quickbars modxlink modai",
2727
"area": "tinymcerte.default"
2828
},
2929
{
@@ -82,7 +82,7 @@
8282
},
8383
{
8484
"key": "skin",
85-
"value": "modx",
85+
"value": "oxide",
8686
"area": "tinymcerte.default"
8787
},
8888
{
@@ -124,9 +124,24 @@
124124
"value": "500",
125125
"area": "tinymcerte.default"
126126
},
127+
{
128+
"key": "min_height",
129+
"value": "100",
130+
"area": "tinymcerte.default"
131+
},
132+
{
133+
"key": "insert_toolbar",
134+
"value": "image media quicktable modxlink modai_generate",
135+
"area": "tinymcerte.toolbar"
136+
},
137+
{
138+
"key": "selection_toolbar",
139+
"value": "bold italic underline | modxlink | modai_enhance",
140+
"area": "tinymcerte.toolbar"
141+
},
127142
{
128143
"key": "toolbar1",
129-
"value": "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | modai_generate modai_enhance",
144+
"value": "undo redo | styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | modxlink | image",
130145
"area": "tinymcerte.toolbar"
131146
},
132147
{
@@ -186,6 +201,11 @@
186201
"area": "modai",
187202
"type": "textarea",
188203
"value": "- This is not a conversation, do not include justifcation, suggestions, or explanation\n- The output should be usable as is, without requiring editing or modification\n- Format it with HTML markup so it will work in the TinyMCE rich text editor"
204+
},
205+
{
206+
"key": "tiny_url",
207+
"area": "tinymcerte.default",
208+
"value": "https://cdnjs.cloudflare.com/ajax/libs/tinymce/6.8.5/tinymce.min.js"
189209
}
190210
]
191211
},

_build/resolvers/resolve.update.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,17 @@ function cleanupPlugin($modx, $name)
236236
addToSetting($modx, 'tinymcerte.toolbar1', '| modai_generate modai_generate_image modai_enhance');
237237
}
238238

239-
if ($oldPackage && $oldPackage->compareVersion('2.1.1-pl', '>')) {
240-
removeFromSetting($modx, 'tinymcerte.toolbar1', 'modai_generate_image');
241-
}
239+
if ($oldPackage && $oldPackage->compareVersion('2.1.1-pl', '>')) {
240+
removeFromSetting($modx, 'tinymcerte.toolbar1', 'modai_generate_image');
241+
}
242+
243+
if ($oldPackage && $oldPackage->compareVersion('2.1.1-pl', '>')) {
244+
addToSetting($modx, 'tinymcerte.plugins', 'quickbars');
245+
changeSetting($modx, 'skin', 'modx', 'oxide');
246+
changeSetting($modx, 'tinymcerte.toolbar1', 'link', 'modxlink');
247+
changeSetting($modx, 'tinymcerte.toolbar2', 'link', 'modxlink');
248+
changeSetting($modx, 'tinymcerte.toolbar3', 'link', 'modxlink');
249+
}
242250

243251
break;
244252
}

_packages/.gitignore

Whitespace-only changes.
-528 KB
Binary file not shown.
-639 KB
Binary file not shown.
-880 KB
Binary file not shown.

0 commit comments

Comments
 (0)