Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Mitchell Crompton <[email protected]>
  • Loading branch information
FarzadHayat and MitchC1999 authored Feb 12, 2024
1 parent d09a9c5 commit 40f988a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<textarea id="getusers-api-alternative">
<p>Existing at mention: <span class="mention" data-mce-mentions-id="user-3">@Alice Smith</span></p>
<p>Add some more at mentions here to track them. Click the <strong>getUsers</strong> button in the toolbar to add a list of currently inserted users to the editor.</p>
<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>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ tinymce.init({
var mentionedUsers = getUsers(editor);
// Insert mentioned users as a bullet list
if (mentionedUsers.length > 0) {
var userList = mentionedUsers.map(function (user) {
return '<li>' + user.name + '</li>';
}).join('');
editor.execCommand('mceInsertContent', false, '<p>Mentioned Users:</p><ul>' + userList + '</ul>');
var userList = mentionedUsers.map((user) => '<li>' + user.name + '</li>').join('');
editor.execCommand('mceInsertContent', false, '<ul>' + userList + '</ul>');
}
}
});
Expand Down

0 comments on commit 40f988a

Please sign in to comment.