Skip to content
Snippets Groups Projects
Commit 937c4b18 authored by FarawayVision's avatar FarawayVision
Browse files

Extended Formatting: add in-dialogue linebreaks and CSS class specifiers

The `</br>` element is now explicitly unescaped in fixupDialogue(), similarly to `<i>`.
CSS classes can now be applied to dialogue by using style specifiers.

Style specifiers consist of CSS class identifiers wrapped in curly braces (i.e. `{foo}`).
Specifiers apply the given CSS classes to all following text until the next specifier.

Internally, dialogue with specifiers applied is wrapped in `<span>` elements.

For example:
```
{class1} This text will have 'class1' applied. {class2} This text will have 'class2' applied now.
```

is transformed into a set of DOM elements equivalent to

```html
<span class="class1">This text will have class1 applied.</span>
<span class="class2">This text will have class2 applied.</span>
```

before being added to the page DOM.

`{!reset}` can be used to clear all previous applied style classes.
parent f32d5f41
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment