-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/release/docs-6' into staging/docs-6
- Loading branch information
Showing
27 changed files
with
659 additions
and
85 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
6.8.2 | ||
6.8.3 |
This file contains 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 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
26 changes: 26 additions & 0 deletions
26
modules/ROOT/examples/live-demos/editable-class-and-editable-root/index.html
This file contains 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,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> | ||
|
||
| ||
|
||
{{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
10
modules/ROOT/examples/live-demos/editable-class-and-editable-root/index.js
This file contains 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,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', | ||
}); |
This file contains 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
16 changes: 16 additions & 0 deletions
16
modules/ROOT/examples/live-demos/getusers-api-alternative/index.html
This file contains 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,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
58
modules/ROOT/examples/live-demos/getusers-api-alternative/index.js
This file contains 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,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
25
modules/ROOT/examples/live-demos/noneditable-class/index.html
This file contains 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,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> | ||
|
||
| ||
|
||
{{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
10
modules/ROOT/examples/live-demos/noneditable-class/index.js
This file contains 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,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
35
modules/ROOT/examples/live-demos/noneditable-regexp/index.html
This file contains 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,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> | ||
|
||
| ||
|
||
{{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
10
modules/ROOT/examples/live-demos/noneditable-regexp/index.js
This file contains 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,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, | ||
}); |
This file contains 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 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
Oops, something went wrong.