Skip to content

Commit

Permalink
Issue IMCMS-464: Menu tag - Leaves visible content even if empty
Browse files Browse the repository at this point in the history
- Add documentation
  • Loading branch information
Victor authored and Victor committed Sep 10, 2019
1 parent 24c724b commit 036a12b
Showing 1 changed file with 51 additions and 47 deletions.
98 changes: 51 additions & 47 deletions docs/design/tag-engine/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,52 +26,56 @@ For configure ``text`` tag in template just look at the code below.
Available list of tag attributes:
"""""""""""""""""""""""""""""""""

+--------------------+--------------+--------------------------------------------------+
| Attribute | Type | Description |
+====================+==============+==================================================+
| no | Integer | Identifier for current text |
+--------------------+--------------+--------------------------------------------------+
| document | Integer | Identify the linked document (default |
| | | - current document) |
+--------------------+--------------+--------------------------------------------------+
| version | Integer | Identify version of text |
+--------------------+--------------+--------------------------------------------------+
| placeholder | String | The text that was showed if native content are |
| | | empty |
+--------------------+--------------+--------------------------------------------------+
| pre | String | Text or html tag that would be added before |
| | | text tag |
+--------------------+--------------+--------------------------------------------------+
| post | String | Text or html tag that would be added after text |
| | | tag |
+--------------------+--------------+--------------------------------------------------+
| | | Possible values: |
| | | ``read`` - means that text won't be editable |
| mode | String | ``write`` - editable text, just as without |
| | | ``mode`` attribute |
| | | |
+--------------------+--------------+--------------------------------------------------+
| | | If set, format switch won't be able. |
| | | Possible values: |
| | | ``text`` - formatting panel will have only simple|
| | | text editor options, content won't be represented|
| | | as HTML |
| | | ``html`` - formatting panel will have HTML editor|
| formats | String | options, content will be represented as HTML |
| | | ``cleanhtml`` - formatting panel will have HTML |
| | | editor options, content will be represented as |
| | | HTML and all tags will be checked according to |
| | | tags whitelist - system property |
| | | ``text.editor.html.tags.whitelist``, where tags |
| | | are separated by semicolon. Not allowed tags will|
| | | be removed from content. |
+--------------------+--------------+--------------------------------------------------+
| label | String | Text label that is connected to current text tag |
+--------------------+--------------+--------------------------------------------------+
| | | Set ``true`` if you want to see text label near |
| showlabel | String | text tag content in admin edit mode |
| | | |
+--------------------+--------------+--------------------------------------------------+
+---------------------+--------------+--------------------------------------------------+
| Attribute | Type | Description |
+=====================+==============+==================================================+
| no | Integer | Identifier for current text |
+---------------------+--------------+--------------------------------------------------+
| document | Integer | Identify the linked document (default |
| | | - current document) |
+---------------------+--------------+--------------------------------------------------+
| version | Integer | Identify version of text |
+---------------------+--------------+--------------------------------------------------+
| placeholder | String | The text that was showed if native content are |
| | | empty |
+---------------------+--------------+--------------------------------------------------+
| pre | String | Text or html tag that would be added before |
| | | text tag |
+---------------------+--------------+--------------------------------------------------+
| post | String | Text or html tag that would be added after text |
| | | tag |
+---------------------+--------------+--------------------------------------------------+
| | | Possible values: |
| | | ``read`` - means that text won't be editable |
| mode | String | ``write`` - editable text, just as without |
| | | ``mode`` attribute |
| | | |
+---------------------+--------------+--------------------------------------------------+
| | | If set, format switch won't be able. |
| | | Possible values: |
| | | ``text`` - formatting panel will have only simple|
| | | text editor options, content won't be represented|
| | | as HTML |
| | | ``html`` - formatting panel will have HTML editor|
| formats | String | options, content will be represented as HTML |
| | | ``cleanhtml`` - formatting panel will have HTML |
| | | editor options, content will be represented as |
| | | HTML and all tags will be checked according to |
| | | tags whitelist - system property |
| | | ``text.editor.html.tags.whitelist``, where tags |
| | | are separated by semicolon. Not allowed tags will|
| | | be removed from content. |
+---------------------+--------------+--------------------------------------------------+
| label | String | Text label that is connected to current text tag |
+---------------------+--------------+--------------------------------------------------+
| | | Set ``true`` if you want to see text label near |
| showlabel | String | text tag content in admin edit mode |
| | | |
+---------------------+--------------+--------------------------------------------------+
| | | Set ``true`` if you want to that be text field |
|showEditToSuperAdmin | String | will be show only for super admin |
| | | |
+---------------------+--------------+--------------------------------------------------+

Example:
""""""""
Expand All @@ -87,7 +91,7 @@ Example:
</head>
<body>
<imcms:text no="1" document="1001" pre="<div>" post="</div>" placeholder="<i>this text is empty</i>"
label="Test text tag" showlabel="true" formats="html"/>
label="Test text tag" showlabel="true" formats="html", showEditToSuperAdmin="true"/>
</body>
</html>
Expand Down

0 comments on commit 036a12b

Please sign in to comment.