@Embed not working in chat messages due to replaceParent being true (v12 prototype 1) #10338
Closed
3 of 6 tasks
Labels
Milestone
What happened?
In
editor.js
_enrichEmbeds
thereplaceParent
option is set to true.Snippet:
Because of this the chat input
@Embed[JournalEntry.DSQM9mLokwFDNUeH.JournalEntryPage.46riMQ1pGoYmrwmA]
doesn't get embedded, however the input<span>@Embed[JournalEntry.DSQM9mLokwFDNUeH.JournalEntryPage.46riMQ1pGoYmrwmA]</span>
or any similar HTML element for that matter; will work as it needs a parent to replace.I noticed this difference while comparing it to
_enrichContentLinks
, locally removed the{ replaceParent: true }
making it work as expected, and from my brief testing doesn't appear to impact Journal Pages.I'd personally imagine this is unintended behavior and
@Embed
should work similarly to@UUID
.What ways of accessing Foundry can you encounter this issue in?
Reproduction Steps
@Embed[uuid-of-journal-entry-page]
<span>@Embed[uuid-of-journal-entry-page]</span>
{replaceParent: true}
fromTextEditor._enrichEmbeds
What core version are you reporting this for?
Version 12 (build 316)
Relevant log output
No response
Bug Checklist
The text was updated successfully, but these errors were encountered: