Документация InstantCMS

для администраторов и разработчиков

Инструменты пользователя

Инструменты сайта


Component "Typographer"

Control panelComponentsTypographer


The component allows you to create presets (settings groups) for printing the text. The control of the typos of the typographer appeared with the version of InstantCMS 2.16.2.

Printing is necessary as a means of automatically applying the rules for a set of texts, vested with the ability to unify HTML markings, control the list of permissible tags and attributes, to prevent possible XSS-advents in data transmitted from users. Uses the library Jevix.

The component is logically closely related to Wysiwyg editors. Consider the allowed tags in the presets of the typos settings Wysiwyg editors. For example, for comments you created the preset of the editor, where for toolbar you allowed the allocation with fat/italics and an insert of images. A good practice will be the creation of an preset for a typograph, where tags <strong>, <b>, <i> and <img> will be allowed. And in the settings of the component «Comments», select the Ponsieur of the Typograph created by you. Similarly, it is worth acting with other sections of InstantCMS, where HTML editors are used, for example, for the wall, field «HTML text» and others.

Creating preset

In the form of creating the preset, you can specify its name and fill out the settings. When choosing HTML tags permitted for each of them, options of possible attributes will appear.

Option «Automatic line breaks» includes automatic converting the symbol of the string \n to the tag <br>.

The option «Automatically detect links» automatically detect the http link and converts into the <a> tag.

The option «External links through the redirect» automatically detect external links in the text and wraps them through an intermediate page. The component should be included redirects.

The option «Enable tag processing with specified callbacks» includes the processing of tags, in the settings of which the callback are indicated.

Option «Auto-replacement» allows you to replace one set of characters with another in the text.

Set of options "Attributes for the tag"

Option «Callback Tag» allows you to specify the tag handler in the format Controller | method . This option is more for the developers and it is worth indicating it when you know exactly what you are doing. You will find the basic set of flasks in the system/controllers/typograph/frontend.php file. All of them are used in the presurchase.

The option «type of attribute» indicates the type of attribute of the tag.

In the Option «Attribute» You indicate the name of the attribute of the tag, for example SRC, Width, Height, etc. Please note that attributes starting with on cannot be indicated.

The option «Possible values of the attribute» indicates a list of possible values, each from a new line. If the user indicates a different meaning in the attribute value, the attribute will not be displayed. This option is relevant for the types of attributes «List of Domains» and «List of meanings».

You can also add the preset by copying the settings from the already created. In this case, in the form of adding, all fields from the copied preset will be filled.

It's an automatic translation

Back to Components

en/manual/components/typograph.txt · Последнее изменение: 25.12.2023 22:03 — fuze