错误:在富文本编辑器中使用带 [wrap] 代码的主题模板

嘿,各位

当我尝试使用带有 wrap bbcode 元素的帖子模板时,就会发生这种情况。在 Chrome 上的 beta2 中进行了测试

重现步骤:

  1. 打开编辑器,确保您处于富文本模式。
  2. 通过编辑器中的 :plus: 图标打开帖子模板。
  3. 找到正文中包含 [wrap] bbcode 的模板。
  4. 点击 :clipboard: 粘贴按钮以插入模板。

预期行为是编辑器应自动切换回 markdown 模式。

当前行为:无反应,控制台中出现错误。

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

命名有点令人困惑,但我已更新上面的帖子
谢谢 @Moin

2 个赞

确认我们已看到此消息,并且我已通知团队。棘手的问题。

1 个赞

一些事件未能捕获到不支持的令牌异常,当 DEV: cover more scenarios for the unsupported token message by renato · Pull Request #35909 · discourse/discourse · GitHub 合并后,这些事件将得到覆盖。

2 个赞

https://github.com/discourse/discourse/pull/36591 起,我们支持富文本编辑器中的 [wrap] 节点,如果您在使用过程中发现任何问题,请随时开启新话题。