Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That was a huge problem to overcome when I was working on the new email designer for ActiveCampaign. Rangy had issues, because it wouldn't select ["empty" elements](https://developer.mozilla.org/en-US/docs/Glossary/Empty_elem...).

I ended up rolling my own solution that worked for us, but one approach we tried out was looking at each selected element's parent. If the first and last element non-empty nodes in the parent were selected, then we also added the parent to the selection.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: