Disable editing in Preview Mode.
Question
@artf How can we disable editing in the preview mode and re-enable it when preview mode off. I want to remove editor and hide toolbar in the preview mode so that user can only view the changes and can not edit it also all the editable option should be come when user stop the preview mode.
Answers (3)
You can use: editor.stopCommand('sw-visibility'); editor.runCommand('sw-visibility');
@jvillena I have used this code but it is not working.
editor.on('run:preview', () => {
editor.stopCommand('sw-visibility');
});
editor.on('stop:preview', () =>
`editor.runCommand('sw-visibility');`
});Hi Artur ( @artf ),
I need to add save and publish button so is there any plugin available or do i need to hardcoded. Can you please help me.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1844
Remove upload image option and disable (x) icon for default images
I want to remove the "Drop files here or click to upload" section and also disable the (x) cross icon next tothe default images, not allowi...
Issue #1090
How to remove toolbar icons
Hi artf, Please let me know how we can remove the toolbar icons like when user click on image element then I don't want delete icon or othe...
Issue #1660
Content will automatically removed while edit in editor
Hello @artf I am facing an issue with grapes.js while editing any textual content. I am using grapes.js Version 0.14.37 with angular 1.6.1....
Issue #651
disable/hide Style Manager
I want user to provide a component's id before they could edit it's styles. To do so i need to disable/ hide Style Manager for some compone...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.