Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ tinymce.init({
suggestededits_model: model,
suggestededits_access: 'feedback', // Set this value to restrict the permissions in the Suggested Edits view
suggestededits_content: 'html',

view_show: 'suggestededits',
user_id: 'kai-nakamura',
fetch_users: (userIds) => Promise.all(userIds
.map((userId) =>
fetch(`${API_URL}/${userId}`)
.then((response) => response.json())
.catch(() => ({ id: userId })))),

init_instance_callback: (editor) => {
editor.execCommand('suggestededits');
}
.catch(() => ({ id: userId }))))
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ tinymce.init({
suggestededits_model: model,
suggestededits_access: 'read', // Set this value to restrict the permissions in the Suggested Edits view
suggestededits_content: 'html',

view_show: 'suggestededits',
user_id: 'kai-nakamura',
fetch_users: (userIds) => Promise.all(userIds
.map((userId) =>
fetch(`${API_URL}/${userId}`)
.then((response) => response.json())
.catch(() => ({ id: userId })))),

init_instance_callback: (editor) => {
editor.execCommand('suggestededits');
}
.catch(() => ({ id: userId }))))
});
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,11 @@ tinymce.init({
suggestededits_access: 'full',
suggestededits_content: 'html',
suggestededits_auto_approve: true,

view_show: 'suggestededits',
user_id: 'kai-nakamura',
fetch_users: (userIds) => Promise.all(userIds
.map((userId) =>
fetch(`${API_URL}/${userId}`)
.then((response) => response.json())
.catch(() => ({ id: userId })))),

init_instance_callback: (editor) => {
editor.execCommand('suggestededits');
}
.catch(() => ({ id: userId }))))
});
8 changes: 2 additions & 6 deletions modules/ROOT/examples/live-demos/suggestededits/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ tinymce.init({
suggestededits_model: model,
suggestededits_access: 'full',
suggestededits_content: 'html',

view_show: 'suggestededits',
user_id: 'kai-nakamura',
fetch_users: (userIds) => Promise.all(userIds
.map((userId) =>
fetch(`${API_URL}/${userId}`)
.then((response) => response.json())
.catch(() => ({ id: userId })))),

init_instance_callback: (editor) => {
editor.execCommand('suggestededits');
}
.catch(() => ({ id: userId }))))
});
2 changes: 1 addition & 1 deletion modules/ROOT/pages/suggestededits.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ include::partial$configuration/suggestededits_access.adoc[leveloffset=+1]

include::partial$configuration/suggestededits_auto_approve.adoc[leveloffset=+1]

include::partial$plugins/suggestededits-open-view.adoc[]
include::partial$plugins/suggestededits-open-view.adoc[leveloffset=+1]

include::partial$configuration/user_id.adoc[leveloffset=+1]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
== Show view on editor load
[[view_show]]
== `+view_show+`

The xref:custom-view.adoc#view_show[`+view_show+`] option can be used to show the {pluginname} view when the editor is loaded.

Expand Down
Loading