step 5: Inside the CustomCss folder create the style.css
step 6: add the following style:
.hide-preview-button {
display: none;
}
So this only hides it not disabling it. If you want to disable it maybe you should override the preview event to do nohting on the action. if possible.
How to Hide Preview Button..
hey there can any one tell me how to hide preview button? using java-script??.
Hi,
maybe this package can help you out: https://our.umbraco.com/packages/collaboration/backoffice-tweaking/
hey julien kulker Backoffice Tweaking package ignore all admin user.. i want to hide preview button for all user.
Hi Parth,
It isn't with javascript but this would work:
step 1: Go to the editfile: ~/Umbraco/Views/components/content/edit.html
step 2: replace the button preview with
step 3: create a new folder "CustomCss" inside the App_Plugins folder:
step 4: create inside the CustomCss folder a new manifest file with this config:
}
step 5: Inside the CustomCss folder create the style.css
step 6: add the following style:
}
So this only hides it not disabling it. If you want to disable it maybe you should override the preview event to do nohting on the action. if possible.
Good luck!
Hi Parth,
This can be done pretty easy hooking into one of the EditorModel events provided by Umbraco : https://our.umbraco.com/documentation/Reference/Events/EditorModel-Events/
Here you can find a sample on how to disable preview : https://github.com/dawoe/umbraco-journey-into-the-unknown/blob/master/App_Code/EditorModelEvents.cs
Dave
Simpliest perfect answer!
is working on a reply...