6
6
6vladislove92020-05-11 23:04:14
Django
6vladislove9, 2020-05-11 23:04:14

Do I need separate fields in models to use iframe?

Need the ability to embed YouTube videos into articles on the site, do iframes need a separate field in the table? If yes, then what?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bubaley, 2020-05-12
@bubaley

If your article consists of html markup (usually test editors for web forms are assembled in this format), then a separate field is not needed. It is enough to insert the collected text as normal html.
If vue is used, then it will be.
In your case, I think it would be better to use a ready-made solution for text formatting. For example https://quilljs.com/ or ckeditor which can be embedded in the django admin.
They support video display as you need out of the box.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question