Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to post iframes within Django template with Quill? #97

Open
marytaylor opened this issue Oct 11, 2022 · 0 comments
Open

Comments

@marytaylor
Copy link

Problem:

When trying to display iframe from Quill onto webpage, it only displays the html and not the actual iframe

Context:

I am using Quill in my admin backend so that I can easily let an admin user add text and links onto a webpage.

Here is what the backend quill form looks like
Screen Shot 2022-10-10 at 8 44 01 PM

I've added safe within the template fields so that URLs display correctly.

<div class="container">
   <br>
   <h2>Where to Buy {{ plant.name }}</h2>
   <div class="affiliate-section">
           {{ plant.affiliate_link.html | safe }}
   </div>

Using safe allows me to display most HTML elements like <p>, <br>, <a href>, and others easily. However, I am not able to get iframes to display correctly. Is there a way around this?

Here is an example of how it displays on the webpage:
Screen Shot 2022-10-10 at 8 51 59 PM

Would I possibly need to add a new item to the toolbar to allow for iframes to be added the same way that videos do? If so, how can I add that?

Looking through the Django Quill Documentation and original JS Quill documentation did not lead me to the solution I seek.

Thank you for any help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant