Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/docs-6' into staging/docs-6
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchC1999 committed Feb 14, 2024
2 parents 11154ec + b7f158c commit 9f93cc1
Show file tree
Hide file tree
Showing 27 changed files with 659 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .api-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.8.2
6.8.3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This project is built using [Antora](https://antora.org/).
If you would like to contribute to the TinyMCE project please read the TinyMCE Documentation Contributor’s Guide at either:

- [TinyMCE Documentation - Contributor's Guide](https://www.tiny.cloud/docs/configure/contributing-docs/).
- [GitHub - Contributing to the TinyMCE developer documentation](https://github.com/tinymce/tinymce-docs/blob/develop/CONTRIBUTING.md#contributing-to-the-tinymce-developer-documentation).
- [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).

## Working on TinyMCE documentation

Expand Down
43 changes: 43 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,53 @@ The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/

### Unreleased

### 2024-02-13

- DOC-2174: added documentation for Mentions plugin's `getUsers` API deprecation to `6.0-release-notes-premium-changes.adoc` and `migration-from-5x.adoc`.
- DOC-2162: Improve documentation for `noneditable` options and multi-root editing.

### 2024-02-09

- DOC-2281: updates to `cloud-troubleshooting.adoc` with new `link` directs to `domain-not-registered`.

### 2024-02-08

- DOC-2242: Added 6.8.3-specific entry to `changelog.adoc`.

- 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.

### 2024-02-05

- DOC-2276: updates to `cloud-troubleshooting.adoc` with new `read-only` ref and links to `invalid-api-key.adoc` page.

### 2024-01-31

- DOC-2275: updates to `cloud-troubleshooting.adoc` with new links to `invalid-api-key.adoc` page.

### 2024-01-30

- DOC-2240: add new `understanding-editor-loads.adoc` to `how-to-guide` section.

### 2024-01-18

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

### 2023-01-15

- DOC-2235: changes and updates to `invalid-api-key.adoc` page.

### 2023-01-11

- DOC-2201: Added link to `ai.adoc` to direct users to the AI Assistant demo.

### 2023-01-10

- DOC-2178: add fix to `live-demos/full-featured/index.js` for `advtemplate` when inserting template.

### 2023-12-20

- DOC-1020: add `language_load` option to `ui-localization.adoc` page that configures whether additional plugin/theme languages are loaded when bundling.

### 2023-12-19

- DOC-2220: add generation of `latest` and `6` documentation in parallel.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<textarea id="editable-class">
<h3>Everything in this page is `noneditable` except elements with the "editable" class:</h3>
<div class="myclass editable">You can edit me :)</div>

<hr>

<div class="myclass editable">You can edit me too</div>

<hr>

<div class="myclass">This information must not be changed...</div>

&nbsp;

{{logofordemoshtml}}

<h2>Found a bug?</h2>

<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>

<h2>Finally…</h2>

<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>
<p>Thanks for supporting TinyMCE. We hope it helps you and your users create great content.</p>
<p>All the best from the TinyMCE team.</p>
</textarea>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tinymce.init({
selector: 'textarea#editable-class',
height: 500,
content_style: `
body { font-family:Helvetica,Arial,sans-serif; font-size:16px }
.editable { border: 0.1rem solid green; border-radius: 0.8rem; padding: 0.2rem; }
`,
editable_root: false,
editable_class: 'editable',
});
24 changes: 11 additions & 13 deletions modules/ROOT/examples/live-demos/full-featured/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,14 @@ tinymce.ScriptLoader.loadScripts(['https://cdn.jsdelivr.net/npm/faker@5/dist/fak
'common/punctuation/hellip'
],
typography_ignore: [ 'code' ],
advtemplate_list: () => {
return Promise.resolve([
{
id: '1',
title: 'Resolving tickets',
content: '<p>As we have not heard back from you in over a week, we have gone ahead and resolved your ticket.</p>'
},
{
id: '2',
advtemplate_templates: [
{
id: '1',
title: 'Resolving tickets',
content: '<p>As we have not heard back from you in over a week, we have gone ahead and resolved your ticket.</p>'
},
{
id: '2',
title: 'Quick replies',
items: [
{
Expand All @@ -223,12 +222,11 @@ tinymce.ScriptLoader.loadScripts(['https://cdn.jsdelivr.net/npm/faker@5/dist/fak
{
id: '4',
title: 'Progress update',
content: '</p>Just a quick note to let you know we are still working on your case</p>'
content: '<p>Just a quick note to let you know we are still working on your case</p>'
}
]
}
]);
},
}
],
link_list: [
{ title: 'My page 1', value: 'https://www.tiny.cloud' },
{ title: 'My page 2', value: 'http://www.moxiecode.com' }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<textarea id="getusers-api-alternative">
<p>The deprecated <code>getUsers</code> API would return an array of currently mentioned names which were mentioned since loading the editor.</p>
<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>

<br><br><br>

<h2>Found a bug?</h2>

<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>

<h2>Finally…</h2>

<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>
<p>Thanks for supporting TinyMCE. We hope it helps you and your users create great content.</p>
<p>All the best from the TinyMCE team.</p>
</textarea>
58 changes: 58 additions & 0 deletions modules/ROOT/examples/live-demos/getusers-api-alternative/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
const users = [
{ id: 'user-1', name: 'Angelina Winn' },
{ id: 'user-2', name: 'Rodrigo Hawkins' },
{ id: 'user-3', name: 'Dianna Smiley' },
{ id: 'user-4', name: 'Eliana Stout' },
{ id: 'user-5', name: 'Oscar Khan' },
{ id: 'user-6', name: 'Mariana Dickey' },
{ id: 'user-7', name: 'Jakoby Roman' },
{ id: 'user-8', name: 'Grace Gross' },
{ id: 'user-9', name: 'Muhammed Sizemore' },
{ id: 'user-10', name: 'Kathryn Mcgee' },
];

const fetchMentions = (query, success) => {
const matches = users.filter((user) => user.name.toLowerCase().includes(query.term.toLowerCase()));
success(matches);
};

const insertedUsers = new Set();

const mentionsInsert = (editor, user) => {
const span = editor.getDoc().createElement('span');
span.className = 'mention';
span.appendChild(editor.getDoc().createTextNode('@' + user.name));
insertedUsers.add(user);
return span;
};

const getUsers = (editor) => {
const spans = Array.from(editor.getBody().querySelectorAll('[data-mce-mentions-id]'));
const currentIds = spans.map((elm) => elm.getAttribute('data-mce-mentions-id'));
const currentUsers = Array.from(insertedUsers).filter((user) => currentIds.includes(user.id));

return currentUsers;
};

tinymce.init({
selector: "textarea#getusers-api-alternative",
plugins: "mentions code",
mentions_fetch: fetchMentions,
mentions_menu_complete: mentionsInsert,

toolbar: 'getUsersButton',
setup: function (editor) {
editor.ui.registry.addButton('getUsersButton', {
text: 'getUsers',
onAction: function () {
// Get mentioned users
var mentionedUsers = getUsers(editor);
// Insert mentioned users as a bullet list
if (mentionedUsers.length > 0) {
var userList = mentionedUsers.map((user) => '<li>' + user.name + '</li>').join('');
editor.execCommand('mceInsertContent', false, '<ul>' + userList + '</ul>');
}
}
});
}
});
25 changes: 25 additions & 0 deletions modules/ROOT/examples/live-demos/noneditable-class/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<textarea id="noneditable-class">
Editable div example
<div class="myclass">You can edit me :)</div>

<hr>

Non-editable div example
<div class="myclass non-editable">You can NOT edit me!</div>

<hr>

&nbsp;

{{logofordemoshtml}}

<h2>Found a bug?</h2>

<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>

<h2>Finally…</h2>

<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>
<p>Thanks for supporting TinyMCE. We hope it helps you and your users create great content.</p>
<p>All the best from the TinyMCE team.</p>
</textarea>
10 changes: 10 additions & 0 deletions modules/ROOT/examples/live-demos/noneditable-class/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tinymce.init({
selector: 'textarea#noneditable-class',
height: 500,
content_style: `
body { font-family:Helvetica,Arial,sans-serif; font-size:16px }
.myclass { border: 0.1rem solid green; border-radius: 0.8rem; padding: 0.2rem; }
.non-editable { border-color: red; }
`,
noneditable_class: 'non-editable',
});
35 changes: 35 additions & 0 deletions modules/ROOT/examples/live-demos/noneditable-regexp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<textarea id="noneditable-regexp">
Editable numbers div example
<div class="myclass green">123456789</div>

<hr>

Non-editable numbers div example
<div class="myclass red">123-456-789</div>

<hr>

Non-editable numbers div example
<div class="myclass red">111-222-333</div>

<hr>

Non-editable apikey div example
<div class="myclass red">sometext apikeyyyy</div>

<hr>

&nbsp;

{{logofordemoshtml}}

<h2>Found a bug?</h2>

<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>

<h2>Finally…</h2>

<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>
<p>Thanks for supporting TinyMCE. We hope it helps you and your users create great content.</p>
<p>All the best from the TinyMCE team.</p>
</textarea>
10 changes: 10 additions & 0 deletions modules/ROOT/examples/live-demos/noneditable-regexp/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tinymce.init({
selector: 'textarea#noneditable-regexp',
height: 500,
content_style: `
body { font-family:Helvetica,Arial,sans-serif; font-size:16px }
.green { border: 0.1rem solid green; border-radius: 0.8rem; padding: 0.2rem; }
.red * { border: 0.1rem solid red; border-radius: 0.8rem; padding: 0.2rem; }
`,
noneditable_regexp: /apikey|\d{3}-\d{3}-\d{3}/g,
});
8 changes: 8 additions & 0 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
** xref:migration-from-5x.adoc[Migrating from TinyMCE 5]
** xref:migration-from-froala.adoc[Migrating from Froala]
** xref:generate-rsa-key-pairs.adoc[Generate public key pairs]
** xref:understanding-editor-loads.adoc[Understanding editor loads]
* xref:examples.adoc[Examples]
** xref:examples.adoc#general-examples[General examples]
*** xref:basic-example.adoc[Basic example]
Expand Down Expand Up @@ -269,6 +270,7 @@
* Content
** xref:add-css-options.adoc[Add CSS]
** xref:content-behavior-options.adoc[Behaviors]
** xref:non-editable-content-options.adoc[Non-editable content]
** xref:user-formatting-options.adoc[User formatting]
** xref:content-filtering.adoc[Content filtering]
** xref:content-localization.adoc[Localization]
Expand Down Expand Up @@ -405,6 +407,12 @@
** xref:tinymce-and-cors.adoc[Cross-Origin Resource Sharing (CORS)]
* Release information
** xref:release-notes.adoc[Release notes for TinyMCE 6]
*** TinyMCE 6.8.3
**** xref:6.8.3-release-notes.adoc#overview[Overview]
**** xref:6.8.3-release-notes.adoc#accompanying-premium-self-hosted-server-side-component-changes[Accompanying Premium self-hosted server-side component changes]
**** xref:6.8.3-release-notes.adoc#accompanying-premium-plugin-changes[Accompanying Premium plugin changes]
**** xref:6.8.3-release-notes.adoc#bug-fixes[Bug fixes]
**** xref:6.8.3-release-notes.adoc#security-fix[Security fix]
*** TinyMCE 6.8.2
**** xref:6.8.2-release-notes.adoc#overview[Overview]
**** xref:6.8.2-release-notes.adoc#accompanying-premium-plugin-changes[Accompanying Premium Plugin changes]
Expand Down
3 changes: 3 additions & 0 deletions modules/ROOT/pages/6.0-release-notes-premium-changes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ The following change was made to the xref:mentions.adoc[Mentions] plugin:

The `getUsers` API was removed.

View the following demo for an alternative to the `getUsers` API:

liveDemo::getusers-api-alternative[height="400"]

=== PowerPaste

Expand Down
Loading

0 comments on commit 9f93cc1

Please sign in to comment.