Overlapping styles and entities in convertToHTML not working when intersecting no style
See original GitHub issueI just noticed the release of #43 which is super cool. Unfortunately, it does not work for intersections situations, which is problematic.
Here is my code:
convertToHTML({
blockToHTML: { // I put this here to have <div> in my output instead of <p>
unstyled: {
start: '<div>',
end: '</div>',
empty: '<br>',
}
},
entityToHTML: (entity, originalText) => {
if (entity.type === 'link') {
return {
start: `<a href="${entity.data.url}" target="_blank">`,
end: '</a>',
}
}
return originalText
}
})(contentState)
Overlapping styles
1. Add link
2. Add bold intersecting link
3. Result
<div>t<strong>e<</strong>a href="http://google.com" target="_blank">st test</a></div>
4. Render
Situation
-
Style strictly inside link ✅

-
Style over link ✅

-
Style outside link ✅

-
Style intersecting link 🔴
Intersect start
Result:
Code:
<div>t<strong>e<</strong>a href="http://google.com" target="_blank">st test te</a>st</div>
Intersect end
Result:
Code:
<div>te<a href="http://google.com" target="_blank">st test t<strong>e<</strong>/a>st</div>
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:13
Top Results From Across the Web
Elements overlapping each other in html page and external ...
I'm new to html and css and i'm having trouble with a lot of elements. The elements in my page keep overlapping each...
Read more >How to Fix Web Pages That Have Overlapping Boxes
In most cases, a quick and easy change to your website's style sheet will fix the problem. 1. Add a margin if the...
Read more >Developing with Oracle WebCenter Sites
11 Working with the WebCenter Sites Database. Types of Database Tables ... Using Methods and Tags to Program Data Management in Non-Asset Tables....
Read more >B2H User's Guide (HTML 3 version) - FTP Directory Listing - IBM
Try running B2H again, this time using different options to vary the output format. For example, specify your own title and do not...
Read more >LAMMPS Users Manual
6.4 Running multiple simulations from one input script. ... 6.12 Triclinic (non-orthogonal) simulation boxes. ... (atom style command).
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

Fix is landed in 1.4.6 - thanks so much for your help @liyantang!
closed via #57 🎉