File tree Expand file tree Collapse file tree 5 files changed +8
-5
lines changed
suggestededits-access-feedback
suggestededits-access-read
suggestededits-auto-approve Expand file tree Collapse file tree 5 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,6 @@ tinymce.init({
2222 . catch ( ( ) => ( { id : userId } ) ) ) ) ,
2323
2424 init_instance_callback : ( editor ) => {
25- tinymce . activeEditor . execCommand ( 'suggestededits' ) ;
25+ editor . execCommand ( 'suggestededits' ) ;
2626 }
2727} ) ;
Original file line number Diff line number Diff line change @@ -22,6 +22,6 @@ tinymce.init({
2222 . catch ( ( ) => ( { id : userId } ) ) ) ) ,
2323
2424 init_instance_callback : ( editor ) => {
25- tinymce . activeEditor . execCommand ( 'suggestededits' ) ;
25+ editor . execCommand ( 'suggestededits' ) ;
2626 }
2727} ) ;
Original file line number Diff line number Diff line change @@ -23,6 +23,6 @@ tinymce.init({
2323 . catch ( ( ) => ( { id : userId } ) ) ) ) ,
2424
2525 init_instance_callback : ( editor ) => {
26- tinymce . activeEditor . execCommand ( 'suggestededits' ) ;
26+ editor . execCommand ( 'suggestededits' ) ;
2727 }
2828} ) ;
Original file line number Diff line number Diff line change @@ -22,6 +22,6 @@ tinymce.init({
2222 . catch ( ( ) => ( { id : userId } ) ) ) ) ,
2323
2424 init_instance_callback : ( editor ) => {
25- tinymce . activeEditor . execCommand ( 'suggestededits' ) ;
25+ editor . execCommand ( 'suggestededits' ) ;
2626 }
2727} ) ;
Original file line number Diff line number Diff line change @@ -19,11 +19,14 @@ NOTE: You are responsible for saving the model and providing it on the next load
1919.Example: using `suggestededits_content`
2020[source,js]
2121----
22+ const tinymceElement = document.querySelector('textarea#suggestededits');
23+ const model = JSON.parse(tinymceElement.getAttribute('suggestededits-model'));
24+
2225tinymce.init({
2326 selector: 'textarea#suggestededits', // Change this value according to your HTML
2427 plugins: 'suggestededits',
2528 toolbar: 'suggestededits',
26- suggestededits_model, // Load the saved model into the editor
29+ suggestededits_model: model , // Load the saved model into the editor
2730 suggestededits_content: 'model' // Set to 'model' if you want to load the initial content from the `suggestededits_model` option
2831});
2932----
You can’t perform that action at this time.
0 commit comments