Added rt-pre attribute to README.md

This commit is contained in:
Antonino Porcino 2016-07-08 14:09:48 +02:00
parent 6c7d032e15
commit 36d69bdcb3
1 changed files with 29 additions and 0 deletions

View File

@ -48,6 +48,7 @@ http://plugins.jetbrains.com/plugin/7648
* ~~rt-require~~ (deprecated, use rt-import)
* [rt-template](#rt-template)
* [rt-include](#rt-include)
* [rt-pre](#rt-pre)
* [styles](#styles)
* [event handlers](#event-handlers)
@ -340,6 +341,34 @@ is equivalent to:
</div>
```
## rt-pre
When using the option `--normalize-html-whitespace` it allows to override the whitespace removal behaviour on a specific tag.
###### Sample:
given `main.rt`:
```html
<span rt-pre>
here repeating whitespaces are preserved
even if --normalize-html-whitespace is on
</span>
<span>
here repeating whitespaces are removed
if --normalize-html-whitespace is on
</span>
```
`rt-pre` is applied automatically on `<pre>` and `<textarea>` tags.
###### Sample:
given `main.rt`:
```html
<pre>
here repeating whitespaces are preserved
even if --normalize-html-whitespace is on
</span>
```
## style
React templates allow the settings of styles inline in HTML, optionally returning an object from the evaluation context. By default, style names will be converted from hyphen-style to camelCase-style naming.