# \[wrap\]-token issue in rich text editor in 3.5.0 revisited | What should I do instead?

**URL:** https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830
**Category:** Feature
**Tags:** composer
**Created:** [August 22, 2025, 12:11pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830 "2025-08-22T12:11:40Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![janbolmeson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/janbolmeson/32/192162_2.png) [@janbolmeson](https://meta.discourse.org/u/janbolmeson)
#### Post date: [August 22, 2025, 12:11pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/1 "2025-08-22T12:11:40Z")

</div>

I have tried to get up to speed with the [wrap]-issue in the new editor in 3.5.0. I understand the workaround to use markup-mode as stated e.g. in

- [Generic [wrap]/Markdown-it Custom Token Types causing errors in RTE](https://meta.discourse.org/t/generic-wrap-markdown-it-custom-token-types-causing-errors-in-rte/377922)
- [Introducing our new composer, making writing on Discourse easier than ever - #16 by Ethsim2](https://meta.discourse.org/t/introducing-our-new-composer-making-writing-on-discourse-easier-than-ever/369779/16)

But I still don’t understand how I should replace it / what to do instead?

E.g. we use it extensively for thing such as:

```plaintext
[wrap=lead]
Lead paragraph in article with different styling.
[/wrap]

```

or

```plaintext
[wrap=alert]
Alert in a form of banner. 
[/wrap]

```

As said, it works in markdown-mode. But in the new rich editor mode it does not (gives the Token-error described in other posts) and nothing is shown at all.

Is there an other way to solve our use case now in 3.5.0?

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [August 22, 2025, 12:37pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/4 "2025-08-22T12:37:10Z")

</div>

Hi @janbolmeson

We’re discussing this internally at this moment. Stay tuned for updates 🙂

---

<div class="post-metadata">

### Author: ![lindsey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lindsey/32/318210_2.png) [@lindsey](https://meta.discourse.org/u/lindsey)
#### Post date: [August 27, 2025, 10:41pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/11 "2025-08-27T22:41:37Z")

</div>

@janbolmeson Thanks for your patience; we’re planning to add support for `[wrap]` tokens in the rich text editor, but we will need some time to get this right. I don’t have an ETA for when this will be ready but we will reach out with updates when they’re available.

---

<div class="post-metadata">

### Author: ![janbolmeson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/janbolmeson/32/192162_2.png) [@janbolmeson](https://meta.discourse.org/u/janbolmeson)
#### Post date: [August 27, 2025, 11:59pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/12 "2025-08-27T23:59:39Z")

</div>

That’s totally fine. I am very happy with the work you guys are doing. ❤

And, there is a workaround, so all is well.

Thx for getting back!

---

<div class="post-metadata">

### Author: ![nordize](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@nordize](https://meta.discourse.org/u/nordize)
#### Post date: [October 23, 2025, 1:40pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/13 "2025-10-23T13:40:14Z")

</div>

I’m having the same issue with the `[details]` tag, from the Details plugin, which is part of core now … any clues? Is there a way to make it work in the new RTE right now?

Interestingly, it gives that error even in posts where I didn’t include any `[details]` tag.

Using 3.5.1

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [October 23, 2025, 1:54pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/14 "2025-10-23T13:54:35Z")

</div>

> [@nordize](#):
>
> even in posts where I didn’t include any `[details]` tag

`[details]` is supported, this is a strong indication that it’s not the content type causing the problem in your document.

> **Summary**
>
> This text will be hidden

Can you share a minimal example that triggers the message?

---

<div class="post-metadata">

### Author: ![nordize](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@nordize](https://meta.discourse.org/u/nordize)
#### Post date: [October 23, 2025, 1:59pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/15 "2025-10-23T13:59:58Z")

</div>

Oops, apologies, it’s the Latex plugin, not the Details plugin. As soon as I add `$1$` then trying to switch to the RTE gives that error.

The Latex plugin is also now part of core. I’m using the Katex variant (not Mathjax).

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [October 23, 2025, 6:03pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/16 "2025-10-23T18:03:54Z")

</div>

When creating a new topic via URL, is there any way to override the site setting for default editor and force the composer to open in Markdown mode? We are currently using external forms to generate new-topic URLs in which we want to utilize `[wrap]` containers in the body= parameter.

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [October 23, 2025, 6:08pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/17 "2025-10-23T18:08:38Z")

</div>

There isn’t, but I think it’s less disruptive now that the Markdown mode is automatically selected after showing

> The rich text editor doesn’t support all features used in this post; switching you to the Markdown editor.

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [October 23, 2025, 6:21pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/18 "2025-10-23T18:21:34Z")

</div>

Ah thx I actually just realized that it’s just switching back automatically when wrap elements are in th composer content.

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [January 16, 2026, 6:25pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/19 "2026-01-16T18:25:57Z")

</div>

`[wrap]` is now supported on the rich editor, I’m closing this but please feel free to open a new topic if you find any issues.

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [January 16, 2026, 6:26pm UTC](https://meta.discourse.org/t/wrap-token-issue-in-rich-text-editor-in-3-5-0-revisited-what-should-i-do-instead/379830/20 "2026-01-16T18:26:02Z")

</div>


