Skip to content

Content Attachment Does not Show in Trix Editor when Coming back to Edit Mode #892

Open
@SudharakaP

Description

@SudharakaP

I am trying to add a content attachment as per, https://github.com/basecamp/trix#inserting-a-content-attachment. And that works fine. When the content attachment is added the trix-editor content looks like this.

image

Now when I go back to the edit mode I would like to populate all this content including the content attachment on the editor. For this I pass in all the content to the input element (https://github.com/basecamp/trix#populating-with-stored-content) which looks like,

<div>My awesome video<br /><figure><iframe src="https://player.vimeo.com/video/521163890/?showinfo=0" allowfullscreen frameborder="0"></iframe><figcaption></figcaption></figure><br /><br /></div>

But somehow when I pass this the editor seems to strip the iframe;

image

Is there anything I am missing here? Any help will be greatly appreciated. Please let me know if you need more information. 🤔

The associated PR that I am working on to integrate the content attachments is; opencollective/opencollective-frontend#6042

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions