mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
Added rt-pre attribute to README.md
This commit is contained in:
parent
6c7d032e15
commit
36d69bdcb3
29
README.md
29
README.md
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user