Helpers `asHTML` duplicate words in richtext with styling (em, strong, ...)
See original GitHub issueI’m trying to add bold on word with italic on some letter of this word.
On API, start and end chars are in good position for each styling, but helpers asHTML
duplicate the part of word inside <em>
Editor :
Render :
I’m using helpers via Eleventy Shortcodes with eleventy-plugin-prismic like this :
{% prismic_asHTML block_title %}
Version
@prismicio/client: "^5.1.0"
node: "v16.11.1"
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Javascript - Copy string to clipboard as text/html
This function expects an HTML string and copies it as rich text. function copyFormatted (html) { // Create container for the HTML //...
Read more >richtext editor - display only 100 symbols from rich text
This problem is best addressed with CSS, where you are trying to control the size of a rendered string, because 100 characters measures...
Read more >Fundamental text and font styling - Learn web development
We hope you enjoyed playing with text in this article! The next article will provide you with all you need to know about...
Read more >How To Select HTML Elements to Style with CSS
This tutorial will build your skill set and help you develop visually rich websites by showing you how to select the right element...
Read more >Rich Text Editor - Salesforce Help
Rich text editors provide a WYSIWYG interface only; you can't edit HTML tags. When you copy content from a web page or another...
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 Free
Top 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
Hey there, thank you so much for the report!
This looks like a bug with the underlying
@prismicio/richtext
package we rewrote recently for optimization purposes.@angeloashmore can you try having a look? (If not I’ll investigate on Monday)
In the meantime if you’re just using the flat
asHTML
shortcode with no serializer, I’m afraid you can’t do much about it 😕Definitely critical so we’ll fix that shortly!
OK, performed some tests on 11ty and wasn’t able to reproduce both of the above this time 🤔
I released an update to the 11ty plugin maintaining dependencies just in case.
If that fixed it for you, I’m still really interested in the result of your
npm ls @prismicio/richtext
result and your rich text field full content ☺️