Lock Content in the Editor

THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO

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:

  1. Right-click on the Styles button above the editor;
  2. From the popup menu, select styles.custom.xml (or any other special style file you have created);
  3. Once the file is open for editing, add the style below to the group of your choice;
  4. Save the file.
XML
<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 the Styles button dropdown list.

Add the style to the editor stylesheet

To add the selector to the publishing stylesheet, follow these steps:

  1. Select the Content tab;
  2. Click on the small e button at the left of the Stylesheet drop down list;
  3. From the popup menu, select the styles_editor.css in the drop down list;
  4. If prompted for a program to open the file, choose Notepad;
  5. Add the style below anywhere in the stylesheet; (1)
  6. Save and close the file;
  7. Click again on the small e button at the left of the Stylesheet drop down list;
  8. 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.

CSS
div.locked {-xs-lock:yes;}

Learn more about this XStandard Editor feature .

THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO

58 / 194