# Editor toolbar generates invalid multi-paragraph spoilers

**URL:** <https://meta.discourse.org/t/editor-toolbar-generates-invalid-multi-paragraph-spoilers/66475>\
**Category:** Bug\
**Created:** [July 19, 2017, 11:02pm UTC](https://meta.discourse.org/t/editor-toolbar-generates-invalid-multi-paragraph-spoilers/66475 "2017-07-19T23:02:31Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dfabulich](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dfabulich/32/108716_2.png) [@dfabulich](https://meta.discourse.org/u/dfabulich)\
**Post date:** [July 19, 2017, 11:02pm UTC](https://meta.discourse.org/t/editor-toolbar-generates-invalid-multi-paragraph-spoilers/66475/1 "2017-07-19T23:02:31Z")

</div>

Continuing the discussion from [HTML \<b\> across paragraph breaks differs between preview and result](https://meta.discourse.org/t/html-b-across-paragraph-breaks-differs-between-preview-and-result/66458/8):

> [@codinghorror](#):
>
> Good point, we should fix the editor toolbar generating this broken output @eviltrout – but @sam says it is already fixed / working.

The editor bug is still there as far as I can see.

To reproduce: on [meta.discourse.org](http://meta.discourse.org) or [try.discourse.org](http://try.discourse.org), type two paragraphs with double line breaks separating them like this:

```markdown
foo

bar

```

Select the paragraphs, click the gear, and click “Blur Spoiler.”

Actual: The editor inserts spoiler tags inline at the start/end of the selection, which used to work, but which no longer makes a multi-paragraph spoiler.

```plaintext
[spoiler]foo

bar[/spoiler]

```

It renders like this:

[spoiler]foo

bar[/spoiler]

Expected:

```plaintext
[spoiler]
foo

bar
[/spoiler]

```

foo

bar

---

_[View the full topic](https://meta.discourse.org/t/editor-toolbar-generates-invalid-multi-paragraph-spoilers/66475)._
