How to use [wrap] tag

When you press (+) then → ] Apply wrap, it puts this menu:


You can put a wrap name and key-value pairs.
Then, when you are done, it makes a [wrap] tag with the default text of “Wrap content”.

[wrap=[wrap name] [key]=[val]]
Wrap content
[/wrap]

Any idea what this is and what it is used for? Thanks.

Its for custom CSS styling I think. From the info I have, it sets data-[key] properties on the div containing the text. (the wrap value is just data-wrap, and other keys are data[key]). And then in some CSS file in your style you add a item for it.

Interesting. Doesn’t seem to work though

Wrap content

[wrap text-align=center]
Wrap content
[/wrap]

You cant use CSS in it, a style has to purposely add a rule to style that wrap.

Which styles?

Whoops! Wrong target!

Original content

The [wrap] tag in Discourse (which this forum uses), does nothing except for this:

[wrap=apple banana=fruit]My wrap[/wrap]

Transforms into:

<div data-wrap="apple" data-banana="fruit">My wrap</div>