# Bug: Utilizzo del modello di argomento con un codice \[wrap\] nell'editor Rich Text

**URL:** <https://meta.discourse.org/t/using-template-with-a-wrap-code-while-in-rich-text-editor-not-working/387388>\
**Category:** Bug\
**Tags:** composer, templates\
**Created:** [2 Novembre 2025, 9:55am UTC](https://meta.discourse.org/t/using-template-with-a-wrap-code-while-in-rich-text-editor-not-working/387388 "2025-11-02T09:55:33Z")\
**Posts on this page:** 1\
**Showing post:** 1

<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:** [2 Novembre 2025, 9:55am UTC](https://meta.discourse.org/t/using-template-with-a-wrap-code-while-in-rich-text-editor-not-working/387388/1 "2025-11-02T09:55:33Z")

</div>

Ciao ragazzi

Succede quando provo a usare un modello di argomento con elementi bbcode `wrap`. Testato con beta2 su Chrome

Per riprodurlo:

1. Apri il compositore, assicurati di essere in modalità rich text.
2. Apri il modello di argomento tramite l’icona ➕ nel compositore
3. Trova un modello che avesse bbcode `[wrap]` nel corpo
4. Fai clic sul pulsante 📋 Incolla per il modello

Il comportamento previsto sarebbe che l’editor torni automaticamente alla modalità markdown

Comportamento attuale: non succede nulla, errore nella console

```plaintext
parser.js:47 Uncaught s
    at o.convert (parser.js:47:15)
    at eF.convertFromMarkdown (prosemirror-editor.gjs:245:24)
    at q._join (index.js:788:21)
    at q.join (index.js:605:17)
    at p (index.js:152:22)
    at eb.convertFromMarkdown (index.js:250:23)
    at eb.insertBlock (text-manipulation.js:167:22)
    at q (cache-fCezwMOy.js:471:12)
    at r.trigger (evented.js:68:5)
    at #h (d-templates.js:101:1)
    at _.insertTemplate (filterable-list.js:115:1)
    at c.apply (item.js:11:1)
    at d-button.gjs:136:19
    at invoke (index.js:264:14)
    at m.flush (index.js:180:11)
    at g.flush (index.js:334:19)
    at q._end (index.js:762:32)
    at q.end (index.js:565:10)
    at q._runExpiredTimers (index.js:869:12)
convert @ parser.js:47
convertFromMarkdown @ prosemirror-editor.gjs:245
_join @ index.js:788
join @ index.js:605
p @ index.js:152
(anonymous) @ index.js:250
insertBlock @ text-manipulation.js:167
q @ cache-fCezwMOy.js:471
trigger @ evented.js:68
#h @ d-templates.js:101
insertTemplate @ filterable-list.js:115
apply @ item.js:11
(anonymous) @ d-button.gjs:136
invoke @ index.js:264
flush @ index.js:180
flush @ index.js:334
_end @ index.js:762
end @ index.js:565
_runExpiredTimers @ index.js:869
setTimeout
setTimeout @ index.js:39
_installTimerTimeout @ index.js:912
_reinstallTimerTimeout @ index.js:896
_later @ index.js:829
later @ index.js:652
T @ index.js:562
_triggerAction @ d-button.gjs:133
click @ d-button.gjs:91

```

---

_[View the full topic](https://meta.discourse.org/t/using-template-with-a-wrap-code-while-in-rich-text-editor-not-working/387388)._
