The rich text editor
To create a text field- click on the "TXT" button in the layer-page toolbox. To edit its content, select "label" in the properties toolbox. The rich text editor shows up:
=> layer-page toolbox
=> properties toolbox
{{media/doc/images/texte.jpg?407x190 }}
. Use the color picker to chose the selected text color
. the second the color picker = the editor background color
. The broom = suppress text formatting
. Yellow arrow = revert to initial value
. The <> button = edit the html source, useful to copy/paste formatted text.
. Fonts list
=> about fonts in SILEX
. Font size
. Text alignement, italic, underlined
. alignement du texte : droite, centre, gauche
. justified (if the website targets Flash Player 8 or 9 only)
. espacement entre les lignes
. The main text field = edit text here.
Properties and resize: . Resize the media in place by dragging the small yellow squares, or by changing width and height properties
. change other text media properties: scrollbar width, selectable, background color, ...
=> media properties list
Commands in the text (use wiki syntax):!!! IN THIS DOCUMENT, WHITE SACES HAVE BEEN ADDED IN ORDER TO AVOID THAT SILEX INTERPRETE IT AS COMMANDS:
"< <" instead of "<<" , idem for : "{ {", ou pour : "[ ["
IF YOU DO COPY PASTE OF COMMANDS, REMOVE THESE WHITE SPACES OR IT WILL NOT WORK !!!
- Inserting images in the text
Insert an image which is in the library by typing this wiki syntax: { { URL of your image } }
Add : Height and width to create spaces in text before the load of the image
Example: blabla… blabla { { media / image.jpg } } blabla…
blabla… blabla { { media / image.jpg ? 470 x 500 } } blabla…
=> library toolbox
- Actions linked to words:
Again, use a wiki syntax so that a word is clickable and a command is executed when you click on it, such as a link or a download occurs.
[ [ commande1 | commande2 | click me!!! ] ]
"click me!!!" : the clickable words. It is always located after the last pipe symbol ("|") (Alt Gr+6)
Example: blabla [ [ http://silex-ria.org | follow this link ] ] blabla…
blabla [ [ http://silex-ria.org | { { media / image_link.jpg } } ] ] blabla…
=> image_link.jpg has to be in the librairy
in these examples, clicking on the text or the image will open the silex website in a new window.
=> Commands list
- Accessors in the text
Accessors are used to display values in text fields.
Insert accessors like this:
blabla < < silex.variable1 > >
Example:
blabla < < silex.utils.DAY > > blabla
displays: blabbla tuesday blabla if today is tuesday and if the language is English
see the accessors list:
=> SILEX accessors
also use this tutorial:
=> tutorial on accessors