File tree Expand file tree Collapse file tree 8 files changed +16
-64
lines changed
modules/ROOT/examples/live-demos
suggestededits-access-feedback
suggestededits-access-read Expand file tree Collapse file tree 8 files changed +16
-64
lines changed Original file line number Diff line number Diff line change 1- const API_URL = 'https://demouserdirectory.tiny.cloud/users' ;
1+ const API_URL = 'https://demouserdirectory.tiny.cloud/v1/ users' ;
22
33const user_id = 'james-wilson' ;
44const collaborator_id = 'mia-andersson' ;
@@ -263,12 +263,6 @@ tinymce.init({
263263 fetch_users : ( userIds ) => Promise . all ( userIds
264264 . map ( ( userId ) =>
265265 fetch ( `${ API_URL } /${ userId } ` )
266- . then ( ( response ) => response . json ( ) )
267- . then ( ( user ) => ( {
268- id : user . id ,
269- name : user . name ,
270- avatar : user . image ,
271- custom : user
272- } ) )
273- . catch ( ( ) => ( { id : userId } ) ) ) )
266+ . then ( ( response ) => response . json ( ) )
267+ . catch ( ( ) => ( { id : userId } ) ) ) )
274268} ) ;
Original file line number Diff line number Diff line change 1- const API_URL = 'https://demouserdirectory.tiny.cloud/users' ;
1+ const API_URL = 'https://demouserdirectory.tiny.cloud/v1/ users' ;
22
33const user_id = 'james-wilson' ;
44const collaborator_id = 'mia-andersson' ;
@@ -211,12 +211,6 @@ tinymce.init({
211211 fetch_users : ( userIds ) => Promise . all ( userIds
212212 . map ( ( userId ) =>
213213 fetch ( `${ API_URL } /${ userId } ` )
214- . then ( ( response ) => response . json ( ) )
215- . then ( ( user ) => ( {
216- id : user . id ,
217- name : user . name ,
218- avatar : user . image ,
219- custom : user
220- } ) )
221- . catch ( ( ) => ( { id : userId } ) ) ) )
214+ . then ( ( response ) => response . json ( ) )
215+ . catch ( ( ) => ( { id : userId } ) ) ) )
222216} ) ;
Original file line number Diff line number Diff line change 1- const API_URL = 'https://demouserdirectory.tiny.cloud/users' ;
1+ const API_URL = 'https://demouserdirectory.tiny.cloud/v1/ users' ;
22
33const mentions_fetch = async ( query , success ) => {
44 const searchPhrase = query . term . toLowerCase ( ) ;
@@ -82,12 +82,6 @@ tinymce.init({
8282 fetch_users : ( userIds ) => Promise . all ( userIds
8383 . map ( ( userId ) =>
8484 fetch ( `${ API_URL } /${ userId } ` )
85- . then ( ( response ) => response . json ( ) )
86- . then ( ( user ) => ( {
87- id : user . id ,
88- name : user . name ,
89- avatar : user . image ,
90- custom : user
91- } ) )
92- . catch ( ( ) => ( { id : userId } ) ) ) )
85+ . then ( ( response ) => response . json ( ) )
86+ . catch ( ( ) => ( { id : userId } ) ) ) )
9387} ) ;
Original file line number Diff line number Diff line change 1- const API_URL = 'https://demouserdirectory.tiny.cloud/users' ;
1+ const API_URL = 'https://demouserdirectory.tiny.cloud/v1/ users' ;
22
33const user_id = 'james-wilson' ;
44
@@ -29,12 +29,6 @@ tinymce.init({
2929 fetch_users : ( userIds ) => Promise . all ( userIds
3030 . map ( ( userId ) =>
3131 fetch ( `${ API_URL } /${ userId } ` )
32- . then ( ( response ) => response . json ( ) )
33- . then ( ( user ) => ( {
34- id : user . id ,
35- name : user . name ,
36- avatar : user . image ,
37- custom : user
38- } ) )
39- . catch ( ( ) => ( { id : userId } ) ) ) )
32+ . then ( ( response ) => response . json ( ) )
33+ . catch ( ( ) => ( { id : userId } ) ) ) )
4034} ) ;
Original file line number Diff line number Diff line change 1- const API_URL = 'https://demouserdirectory.tiny.cloud/users' ;
1+ const API_URL = 'https://demouserdirectory.tiny.cloud/v1/ users' ;
22
33const fakeDelay = 200 ;
44
@@ -170,11 +170,5 @@ tinymce.init({
170170 . map ( ( userId ) =>
171171 fetch ( `${ API_URL } /${ userId } ` )
172172 . then ( ( response ) => response . json ( ) )
173- . then ( ( user ) => ( {
174- id : user . id ,
175- name : user . name ,
176- avatar : user . image ,
177- custom : user
178- } ) )
179173 . catch ( ( ) => ( { id : userId } ) ) ) ) ,
180174} ) ;
Original file line number Diff line number Diff line change 1- const API_URL = 'https://demouserdirectory.tiny.cloud/users' ;
1+ const API_URL = 'https://demouserdirectory.tiny.cloud/v1/ users' ;
22
33const tinymceElement = document . querySelector ( 'textarea#suggestededits-access-feedback' ) ;
44const model = JSON . parse ( tinymceElement . getAttribute ( 'suggestededits-model' ) ) ;
@@ -19,11 +19,5 @@ tinymce.init({
1919 . map ( ( userId ) =>
2020 fetch ( `${ API_URL } /${ userId } ` )
2121 . then ( ( response ) => response . json ( ) )
22- . then ( ( user ) => ( {
23- id : user . id ,
24- name : user . name ,
25- avatar : user . image ,
26- custom : user
27- } ) )
2822 . catch ( ( ) => ( { id : userId } ) ) ) ) ,
2923} ) ;
Original file line number Diff line number Diff line change 1- const API_URL = 'https://demouserdirectory.tiny.cloud/users' ;
1+ const API_URL = 'https://demouserdirectory.tiny.cloud/v1/ users' ;
22
33const tinymceElement = document . querySelector ( 'textarea#suggestededits-access-feedback' ) ;
44const model = JSON . parse ( tinymceElement . getAttribute ( 'suggestededits-model' ) ) ;
@@ -19,11 +19,5 @@ tinymce.init({
1919 . map ( ( userId ) =>
2020 fetch ( `${ API_URL } /${ userId } ` )
2121 . then ( ( response ) => response . json ( ) )
22- . then ( ( user ) => ( {
23- id : user . id ,
24- name : user . name ,
25- avatar : user . image ,
26- custom : user
27- } ) )
2822 . catch ( ( ) => ( { id : userId } ) ) ) ) ,
2923} ) ;
Original file line number Diff line number Diff line change 1- const API_URL = 'https://demouserdirectory.tiny.cloud/users' ;
1+ const API_URL = 'https://demouserdirectory.tiny.cloud/v1/ users' ;
22
33const tinymceElement = document . querySelector ( 'textarea#suggestededits' ) ;
44const model = JSON . parse ( tinymceElement . getAttribute ( 'suggestededits-model' ) ) ;
@@ -19,11 +19,5 @@ tinymce.init({
1919 . map ( ( userId ) =>
2020 fetch ( `${ API_URL } /${ userId } ` )
2121 . then ( ( response ) => response . json ( ) )
22- . then ( ( user ) => ( {
23- id : user . id ,
24- name : user . name ,
25- avatar : user . image ,
26- custom : user
27- } ) )
2822 . catch ( ( ) => ( { id : userId } ) ) ) ) ,
2923} ) ;
You can’t perform that action at this time.
0 commit comments