Passionate full stack web developer, course author for Educative, book author for Packt, he/him.
Find my work and get to know me on my Linktree: https://linktr.ee/thormeier
To be honest, I would have to read a lot deeper into the range API to really understand it, but it does look promising! I hope that the Selection API will get some more attention and leave the "experimental" state soon, since it has a lot of potential. What's the reason for you not liking the Range API at the moment?
Despite being experimental, the selection API has the same support as the range API. Perhaps an abstraction layer would do the trick but will take a lot of time and careful engineering.
About a year ago I really wanted to create my own WYSIWYG editor. Things I read about document exec were not good. For instance, what happens when someone tries to paste text from outside, how are we going to handle the tags in the pasted text.
Moreover, it is deprecated which is literally a mood killer. Someday I'll create a really simple WYSIWYG editor using range and or selection API. I have general knowledge of trees but working with nodes, correctly inserting and removing nodes is NOT an easy thing.
Yeap, same here would really love to build my own WYSIWYG even for testing / learning purposes I know a great range of editors but still want to dive in this part and build one from scratch..
document exec is great and easy to use most of the editors these days are based on them except the very new ones. but as you said it's deprecated and you can't count on it + building with exec it's a 20 - 30 minutes jobs to do simple things. Diving into selection and range that's the real stuff to play with.
Indeed. When I was looking into this initially an agency shared a kind of a case study saying that making a WYSIWYG was one of the most difficult things that they had ever done. They even went on to say that it is one of the most complicated thing on the front-end.
Passionate full stack web developer, course author for Educative, book author for Packt, he/him.
Find my work and get to know me on my Linktree: https://linktr.ee/thormeier
Oh yes, it absolutely is. I find it an absolute pity that execCommand got deprecated. This thing shows how simple it could be, but ultimately isn't when you want to have support on all browsers and not rewrite that thing in a year or two.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
To be honest, I would have to read a lot deeper into the range API to really understand it, but it does look promising! I hope that the Selection API will get some more attention and leave the "experimental" state soon, since it has a lot of potential. What's the reason for you not liking the Range API at the moment?
Despite being experimental, the selection API has the same support as the range API. Perhaps an abstraction layer would do the trick but will take a lot of time and careful engineering.
About a year ago I really wanted to create my own WYSIWYG editor. Things I read about document exec were not good. For instance, what happens when someone tries to paste text from outside, how are we going to handle the tags in the pasted text.
Moreover, it is deprecated which is literally a mood killer. Someday I'll create a really simple WYSIWYG editor using range and or selection API. I have general knowledge of trees but working with nodes, correctly inserting and removing nodes is NOT an easy thing.
Yeap, same here would really love to build my own WYSIWYG even for testing / learning purposes I know a great range of editors but still want to dive in this part and build one from scratch..
document exec is great and easy to use most of the editors these days are based on them except the very new ones. but as you said it's deprecated and you can't count on it + building with exec it's a 20 - 30 minutes jobs to do simple things. Diving into selection and range that's the real stuff to play with.
Indeed. When I was looking into this initially an agency shared a kind of a case study saying that making a WYSIWYG was one of the most difficult things that they had ever done. They even went on to say that it is one of the most complicated thing on the front-end.
Oh yes, it absolutely is. I find it an absolute pity that execCommand got deprecated. This thing shows how simple it could be, but ultimately isn't when you want to have support on all browsers and not rewrite that thing in a year or two.