Lock Content in the Editor
In this tutorial, you'll learn how to lock content in the editor by associating spcial XSTandard Editor CSS property to the editor stylesheet. This method could be useful to prevent a casual from deleting content during the editing process.
Add the tag to the styles list
Once you have decided on which name you'll give to your tag, follow these steps to create a new style file first:
- Right-click on the button above the editor;
- From the popup menu, select (or any other special style file you have created);
- Once the file is open for editing, add the style below to the group of your choice;
- Save the file.
<style> <name xml:lang="en">Locked content</name> <name xml:lang="fr">Contenu verrouillé</name> <description xml:lang="en"/> <description xml:lang="fr"/> <elt>div</elt> <attr> <name>class</name> <value>locked</value> </attr> </style>
You can then apply this style around selected content through thebutton dropdown list.
Add the style to the editor stylesheet
To add the selector to the publishing stylesheet, follow these steps:
- Select the Content tab;
- Click on the small button at the left of the Stylesheet drop down list;
- From the popup menu, select the styles_editor.css in the drop down list;
- If prompted for a program to open the file, choose Notepad;
- Add the style below anywhere in the stylesheet; (1)
- Save and close the file;
- Click again on the small button at the left of the Stylesheet drop down list;
- From the popup menu, select “Reresh the editor” from the drop down list.
(1) All stylesheets that are installed with Tópico already have this selector.