API should provide access to the HTML-converted versions of rich text fields
See original GitHub issueHello, I’m working with a Wagtail 1.5 site and we have a rich text field. When we embed a video using the included functionality, the HTML comes out looking like:
<embed embedtype=\"media\" url=\"https://www.youtube.com/watch?v=1TQ0gZJbWP8\"/>
This is not a valid embed tag, it should look like:
<embed type=\"media\" src=\"https://www.youtube.com/watch?v=1TQ0gZJbWP8\"/>
Notice, embedtype->type and url->src.
This is based on this spec: http://www.w3schools.com/tags/tag_embed.asp
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:14 (2 by maintainers)
Top Results From Across the Web
What is rich text? - Contentful
Rich Text is a field type that enables authors to create rich text content, similar to traditional "What you see is what you...
Read more >Please fix markdown output with "rich" API - Developers Central
I know that normal text fields and canvas fields generate “Markdown” output if fetched from the API using valueFormat=rich.
Read more >Rich text field storage in the API | Adobe Workfront
Requesting text information from a project object that contains rich text can be done using the field parameterValues.
Read more >Cannot access images in rich text fields coming from REST API
I have a big problem that I cannot get my head around: We created a REST API that returns an object with a...
Read more >Rich Text Fields and Types | Documentation - Review Board
New in version 2.0. Several resources in the API provide text fields that can store either plain text or Markdown text. These text...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
then we can do the following depending on taste:
or
For anyone using a RichTextBlock inside of a StreamField who would like the Wagtail API to generate the HTML for just the RichText block of the StreamField whilst preserving the other block structure in the API output:
NB. This works on Django 2.2 Wagtail 2.7