Skip to content

Commit 9f93cc1

Browse files
committed
Merge remote-tracking branch 'origin/release/docs-6' into staging/docs-6
2 parents 11154ec + b7f158c commit 9f93cc1

27 files changed

+659
-85
lines changed

.api-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.8.2
1+
6.8.3

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This project is built using [Antora](https://antora.org/).
1313
If you would like to contribute to the TinyMCE project please read the TinyMCE Documentation Contributor’s Guide at either:
1414

1515
- [TinyMCE Documentation - Contributor's Guide](https://www.tiny.cloud/docs/configure/contributing-docs/).
16-
- [GitHub - Contributing to the TinyMCE developer documentation](https://github.com/tinymce/tinymce-docs/blob/develop/CONTRIBUTING.md#contributing-to-the-tinymce-developer-documentation).
16+
- [GitHub - How to contribute to TinyMCE’s documentation](https://github.com/tinymce/tinymce-docs/blob/release/docs-6/CONTRIBUTING.md#how-to-contribute-to-tinymces-documentation).
1717

1818
## Working on TinyMCE documentation
1919

changelog.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,53 @@ The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/
66

77
### Unreleased
88

9+
### 2024-02-13
10+
11+
- DOC-2174: added documentation for Mentions plugin's `getUsers` API deprecation to `6.0-release-notes-premium-changes.adoc` and `migration-from-5x.adoc`.
12+
- DOC-2162: Improve documentation for `noneditable` options and multi-root editing.
13+
14+
### 2024-02-09
15+
16+
- DOC-2281: updates to `cloud-troubleshooting.adoc` with new `link` directs to `domain-not-registered`.
17+
18+
### 2024-02-08
19+
20+
- DOC-2242: Added 6.8.3-specific entry to `changelog.adoc`.
21+
22+
- DOC-2241: added `6.8.3-release-notes.adoc` to project; updated `changelog.adoc`, `nav.adoc` and `release-notes.adoc` for the TinyMCE 6.8.3 release.
23+
24+
### 2024-02-05
25+
26+
- DOC-2276: updates to `cloud-troubleshooting.adoc` with new `read-only` ref and links to `invalid-api-key.adoc` page.
27+
28+
### 2024-01-31
29+
30+
- DOC-2275: updates to `cloud-troubleshooting.adoc` with new links to `invalid-api-key.adoc` page.
31+
32+
### 2024-01-30
33+
34+
- DOC-2240: add new `understanding-editor-loads.adoc` to `how-to-guide` section.
35+
936
### 2024-01-18
1037

1138
- DOC-1925: Add `Skins and Icons examples` to examples.adoc index page
1239

40+
### 2023-01-15
41+
42+
- DOC-2235: changes and updates to `invalid-api-key.adoc` page.
43+
44+
### 2023-01-11
45+
46+
- DOC-2201: Added link to `ai.adoc` to direct users to the AI Assistant demo.
47+
48+
### 2023-01-10
49+
50+
- DOC-2178: add fix to `live-demos/full-featured/index.js` for `advtemplate` when inserting template.
51+
52+
### 2023-12-20
53+
54+
- DOC-1020: add `language_load` option to `ui-localization.adoc` page that configures whether additional plugin/theme languages are loaded when bundling.
55+
1356
### 2023-12-19
1457

1558
- DOC-2220: add generation of `latest` and `6` documentation in parallel.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<textarea id="editable-class">
2+
<h3>Everything in this page is `noneditable` except elements with the "editable" class:</h3>
3+
<div class="myclass editable">You can edit me :)</div>
4+
5+
<hr>
6+
7+
<div class="myclass editable">You can edit me too</div>
8+
9+
<hr>
10+
11+
<div class="myclass">This information must not be changed...</div>
12+
13+
&nbsp;
14+
15+
{{logofordemoshtml}}
16+
17+
<h2>Found a bug?</h2>
18+
19+
<p>If you believe you have found a bug please create an issue on the <a href="https://github.com/tinymce/tinymce/issues">GitHub repo</a> to report it to the developers.</p>
20+
21+
<h2>Finally…</h2>
22+
23+
<p>Don’t forget to check out <a href="http://www.plupload.com" target="_blank">Plupload</a>, the upload solution featuring HTML5 upload support.</p>
24+
<p>Thanks for supporting TinyMCE. We hope it helps you and your users create great content.</p>
25+
<p>All the best from the TinyMCE team.</p>
26+
</textarea>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
tinymce.init({
2+
selector: 'textarea#editable-class',
3+
height: 500,
4+
content_style: `
5+
body { font-family:Helvetica,Arial,sans-serif; font-size:16px }
6+
.editable { border: 0.1rem solid green; border-radius: 0.8rem; padding: 0.2rem; }
7+
`,
8+
editable_root: false,
9+
editable_class: 'editable',
10+
});

modules/ROOT/examples/live-demos/full-featured/index.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,14 @@ tinymce.ScriptLoader.loadScripts(['https://cdn.jsdelivr.net/npm/faker@5/dist/fak
204204
'common/punctuation/hellip'
205205
],
206206
typography_ignore: [ 'code' ],
207-
advtemplate_list: () => {
208-
return Promise.resolve([
209-
{
210-
id: '1',
211-
title: 'Resolving tickets',
212-
content: '<p>As we have not heard back from you in over a week, we have gone ahead and resolved your ticket.</p>'
213-
},
214-
{
215-
id: '2',
207+
advtemplate_templates: [
208+
{
209+
id: '1',
210+
title: 'Resolving tickets',
211+
content: '<p>As we have not heard back from you in over a week, we have gone ahead and resolved your ticket.</p>'
212+
},
213+
{
214+
id: '2',
216215
title: 'Quick replies',
217216
items: [
218217
{
@@ -223,12 +222,11 @@ tinymce.ScriptLoader.loadScripts(['https://cdn.jsdelivr.net/npm/faker@5/dist/fak
223222
{
224223
id: '4',
225224
title: 'Progress update',
226-
content: '</p>Just a quick note to let you know we are still working on your case</p>'
225+
content: '<p>Just a quick note to let you know we are still working on your case</p>'
227226
}
228227
]
229-
}
230-
]);
231-
},
228+
}
229+
],
232230
link_list: [
233231
{ title: 'My page 1', value: 'https://www.tiny.cloud' },
234232
{ title: 'My page 2', value: 'http://www.moxiecode.com' }
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<textarea id="getusers-api-alternative">
2+
<p>The deprecated <code>getUsers</code> API would return an array of currently mentioned names which were mentioned since loading the editor.</p>
3+
<p>Add some mentions to the content by typing "@a...", then click the <strong>getUsers</strong> button in the toolbar to insert a list of names which have been mentioned.</p>
4+
5+
<br><br><br>
6+
7+
<h2>Found a bug?</h2>
8+
9+
<p>If you believe you have found a bug please create an issue on the <a href="https://github.com/tinymce/tinymce/issues">GitHub repo</a> to report it to the developers.</p>
10+
11+
<h2>Finally…</h2>
12+
13+
<p>Don’t forget to check out <a href="http://www.plupload.com" target="_blank">Plupload</a>, the upload solution featuring HTML5 upload support.</p>
14+
<p>Thanks for supporting TinyMCE. We hope it helps you and your users create great content.</p>
15+
<p>All the best from the TinyMCE team.</p>
16+
</textarea>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
const users = [
2+
{ id: 'user-1', name: 'Angelina Winn' },
3+
{ id: 'user-2', name: 'Rodrigo Hawkins' },
4+
{ id: 'user-3', name: 'Dianna Smiley' },
5+
{ id: 'user-4', name: 'Eliana Stout' },
6+
{ id: 'user-5', name: 'Oscar Khan' },
7+
{ id: 'user-6', name: 'Mariana Dickey' },
8+
{ id: 'user-7', name: 'Jakoby Roman' },
9+
{ id: 'user-8', name: 'Grace Gross' },
10+
{ id: 'user-9', name: 'Muhammed Sizemore' },
11+
{ id: 'user-10', name: 'Kathryn Mcgee' },
12+
];
13+
14+
const fetchMentions = (query, success) => {
15+
const matches = users.filter((user) => user.name.toLowerCase().includes(query.term.toLowerCase()));
16+
success(matches);
17+
};
18+
19+
const insertedUsers = new Set();
20+
21+
const mentionsInsert = (editor, user) => {
22+
const span = editor.getDoc().createElement('span');
23+
span.className = 'mention';
24+
span.appendChild(editor.getDoc().createTextNode('@' + user.name));
25+
insertedUsers.add(user);
26+
return span;
27+
};
28+
29+
const getUsers = (editor) => {
30+
const spans = Array.from(editor.getBody().querySelectorAll('[data-mce-mentions-id]'));
31+
const currentIds = spans.map((elm) => elm.getAttribute('data-mce-mentions-id'));
32+
const currentUsers = Array.from(insertedUsers).filter((user) => currentIds.includes(user.id));
33+
34+
return currentUsers;
35+
};
36+
37+
tinymce.init({
38+
selector: "textarea#getusers-api-alternative",
39+
plugins: "mentions code",
40+
mentions_fetch: fetchMentions,
41+
mentions_menu_complete: mentionsInsert,
42+
43+
toolbar: 'getUsersButton',
44+
setup: function (editor) {
45+
editor.ui.registry.addButton('getUsersButton', {
46+
text: 'getUsers',
47+
onAction: function () {
48+
// Get mentioned users
49+
var mentionedUsers = getUsers(editor);
50+
// Insert mentioned users as a bullet list
51+
if (mentionedUsers.length > 0) {
52+
var userList = mentionedUsers.map((user) => '<li>' + user.name + '</li>').join('');
53+
editor.execCommand('mceInsertContent', false, '<ul>' + userList + '</ul>');
54+
}
55+
}
56+
});
57+
}
58+
});
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<textarea id="noneditable-class">
2+
Editable div example
3+
<div class="myclass">You can edit me :)</div>
4+
5+
<hr>
6+
7+
Non-editable div example
8+
<div class="myclass non-editable">You can NOT edit me!</div>
9+
10+
<hr>
11+
12+
&nbsp;
13+
14+
{{logofordemoshtml}}
15+
16+
<h2>Found a bug?</h2>
17+
18+
<p>If you believe you have found a bug please create an issue on the <a href="https://github.com/tinymce/tinymce/issues">GitHub repo</a> to report it to the developers.</p>
19+
20+
<h2>Finally…</h2>
21+
22+
<p>Don’t forget to check out <a href="http://www.plupload.com" target="_blank">Plupload</a>, the upload solution featuring HTML5 upload support.</p>
23+
<p>Thanks for supporting TinyMCE. We hope it helps you and your users create great content.</p>
24+
<p>All the best from the TinyMCE team.</p>
25+
</textarea>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
tinymce.init({
2+
selector: 'textarea#noneditable-class',
3+
height: 500,
4+
content_style: `
5+
body { font-family:Helvetica,Arial,sans-serif; font-size:16px }
6+
.myclass { border: 0.1rem solid green; border-radius: 0.8rem; padding: 0.2rem; }
7+
.non-editable { border-color: red; }
8+
`,
9+
noneditable_class: 'non-editable',
10+
});

0 commit comments

Comments
 (0)