basecamp / basecamp/trix

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

Open
#892 2 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
JavaScript
Stars
20k
Forks
1.1k
Avg merge
3d 12h
Merged PRs (30d)
13

Description

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](https://user-images.githubusercontent.com/12435965/111061915-919f6e80-845a-11eb-95c7-297c4835773f.png)

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,

```

My awesome video



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

![image](https://user-images.githubusercontent.com/12435965/111062341-1b503b80-845d-11eb-9fdf-2bfd2d11136d.png)

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; https://github.com/opencollective/opencollective-frontend/pull/6042

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.