The Unsung Heros of Rich Text Editors I

HTML Javascript Rich Text Editor 1

Just recently, I discovered the “hidden magic” of the Rich Text Editor works and wanted to look into it more.

This mechanism that is used is the document.designMode property on a full webpage, you gain access to to write to it as if it is a full scale word document… (https://developer.mozilla.org/en-US/docs/Web/API/Document/designMode). Now this is going to allow you to send in commands using the Document.execCommand (https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) for things such as Justification, Font Size, Font Type, Cut, Copy and Paste (more about that in my next post).

Nicely enough, this also is compatible in all versions of the Desktop variety (Chrome, Edge, Firefox (aka Gecko), IE, Opera and Safari, but doesn’t appear to be readily available in the mobile environments except for Android WebView and Android Chrome.

Unfortunately, this only works for entire documents. If you want to force a specific element to be editable, such as within the current document, you will have to use the element.contentEditable (https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/contentEditable) this can enable a div element to become editable and then you can start dumping details into it.

This particular method has less functionality within the the desktop bracket, but has more availability within the mobile environments. So long story short, looking at the specific version of the browser, and how you want to use it, you might need to create an IFrame within your application that will absorb the text and then process it, or if it is a later version of a browser, or perhaps a mobile implementation, use an DIV element and process it as such.

Until next time, Happy Coding and may you be blessed!

20 comments

  1. I have to express some appreciation to this writer for rescuing me from such a situation. Just after researching throughout the the web and meeting techniques which were not productive, I thought my entire life was done. Living minus the solutions to the issues you have sorted out by way of your review is a serious case, as well as the ones which may have negatively affected my career if I had not discovered your website. The knowledge and kindness in dealing with a lot of stuff was excellent. I don’t know what I would have done if I hadn’t encountered such a point like this. I’m able to now relish my future. Thanks a lot very much for the specialized and amazing help. I will not be reluctant to suggest your web blog to anybody who needs and wants guidance on this subject.

  2. My wife and i felt absolutely comfortable when Louis managed to finish up his homework through the entire precious recommendations he was given while using the blog. It is now and again perplexing to just continually be giving for free information and facts that many a number of people might have been selling. And now we consider we now have you to give thanks to for that. All the explanations you have made, the simple site navigation, the friendships you will aid to instill – it is many fabulous, and it’s assisting our son and our family recognize that the idea is pleasurable, which is especially pressing. Many thanks for everything!

  3. I in addition to my pals happened to be viewing the best tips and tricks from your web page then then got a terrible suspicion I never expressed respect to the blog owner for those techniques. The young boys became certainly happy to read through all of them and have now without a doubt been tapping into those things. Appreciate your genuinely quite considerate and also for making a decision on some impressive subject areas most people are really desperate to understand about. My personal honest regret for not saying thanks to earlier.

  4. Needed to create you the bit of note so as to thank you over again for those stunning guidelines you have provided on this site. It has been generous of people like you to provide unhampered what a number of people could have advertised for an ebook in making some cash for their own end, and in particular since you might have done it in case you considered necessary. Those principles as well worked to become a good way to know that most people have the same interest like my personal own to know the truth good deal more with regard to this matter. I am sure there are lots of more pleasant opportunities up front for many who read through your blog post.

  5. I want to show appreciation to this writer just for rescuing me from this particular setting. Right after exploring throughout the the net and meeting views which were not beneficial, I believed my entire life was done. Being alive without the presence of strategies to the difficulties you have solved through your blog post is a serious case, as well as ones that might have negatively affected my entire career if I had not discovered your web site. Your main competence and kindness in touching every aspect was very helpful. I am not sure what I would’ve done if I hadn’t come across such a point like this. I can at this time look forward to my future. Thanks a lot very much for this skilled and sensible guide. I will not hesitate to recommend your web blog to any person who requires guide about this subject matter.

  6. I wish to show my thanks to the writer for rescuing me from this trouble. Just after researching throughout the world wide web and getting methods that were not beneficial, I figured my life was done. Living without the presence of solutions to the difficulties you have resolved by means of your main write-up is a critical case, as well as ones that might have badly damaged my career if I hadn’t come across your site. Your good knowledge and kindness in maneuvering every part was tremendous. I don’t know what I would have done if I hadn’t come across such a thing like this. It’s possible to now look forward to my future. Thanks a lot very much for your specialized and result oriented guide. I won’t be reluctant to suggest your web site to any individual who will need recommendations about this subject matter.

  7. I would like to express my thanks to the writer for bailing me out of this type of scenario. Because of exploring throughout the search engines and coming across ideas which were not productive, I thought my life was well over. Being alive devoid of the approaches to the issues you have resolved as a result of the review is a serious case, and the ones that would have negatively affected my career if I hadn’t encountered your blog. Your actual skills and kindness in maneuvering every item was invaluable. I am not sure what I would’ve done if I hadn’t encountered such a thing like this. I am able to at this point relish my future. Thank you very much for this specialized and amazing help. I will not hesitate to refer your blog to anybody who needs to have recommendations on this issue.

  8. I precisely had to say thanks once again. I’m not certain what I would’ve worked on without those methods shared by you relating to my theme. It actually was a frightful setting for me personally, however , encountering your professional tactic you processed it took me to cry for contentment. I’m happier for your guidance and as well , wish you know what a great job you’re getting into educating men and women with the aid of your blog post. Probably you’ve never come across any of us.

  9. I’m also commenting to let you be aware of what a helpful encounter my child enjoyed using your web site. She came to understand too many things, which included how it is like to possess an ideal helping character to get many people without difficulty fully understand a number of extremely tough subject matter. You undoubtedly exceeded her desires. I appreciate you for churning out such necessary, trusted, informative and even unique thoughts on this topic to Sandra.

  10. I am just writing to make you know of the fantastic encounter my wife’s daughter gained reading yuor web blog. She mastered a good number of things, most notably how it is like to have an amazing teaching style to have other individuals really easily master a variety of complex subject areas. You actually exceeded her expectations. Thanks for distributing the powerful, trusted, informative and as well as fun thoughts on that topic to Ethel.

  11. I precisely had to say thanks again. I am not sure what I could possibly have tried without those secrets discussed by you relating to such a field. It seemed to be a very scary case in my opinion, but discovering a professional way you handled that forced me to cry over delight. Now i am happy for your help as well as have high hopes you are aware of a powerful job that you’re carrying out educating the mediocre ones using your webblog. Most probably you’ve never encountered any of us.

  12. I together with my friends happened to be digesting the great information found on your website and all of the sudden came up with an awful suspicion I never expressed respect to the blog owner for those secrets. The women had been as a consequence excited to study them and already have surely been taking pleasure in these things. Appreciate your simply being so kind and then for finding this form of superb useful guides most people are really wanting to understand about. My personal sincere apologies for not saying thanks to earlier.

  13. I wish to express my appreciation to the writer for rescuing me from this situation. Right after looking out throughout the the net and getting concepts which were not beneficial, I thought my entire life was over. Existing minus the approaches to the problems you have resolved as a result of your post is a serious case, as well as ones which could have in a wrong way affected my career if I hadn’t encountered the website. Your personal talents and kindness in dealing with all things was valuable. I don’t know what I would have done if I hadn’t discovered such a step like this. I can now look forward to my future. Thanks for your time very much for your professional and amazing help. I won’t be reluctant to propose your web sites to anyone who ought to have direction on this issue.

  14. Thank you for your entire work on this website. My aunt take interest in making time for research and it’s easy to understand why. A lot of people hear all regarding the powerful ways you create great information by means of your web blog and as well boost participation from other individuals on that situation so our favorite girl is really understanding a lot. Take advantage of the remaining portion of the new year. You’re performing a good job.

  15. I in addition to my pals happened to be analyzing the great pointers located on your website then quickly I got a horrible feeling I had not thanked the web blog owner for those secrets. Those boys appeared to be so excited to study them and now have simply been taking advantage of them. Thanks for getting simply thoughtful and then for considering this form of magnificent themes most people are really desirous to be aware of. Our honest apologies for not saying thanks to sooner.

  16. Needed to create you one little note in order to thank you so much once again with the striking things you’ve shown on this page. It is really open-handed with you to make unreservedly just what most of us could have offered for an electronic book to help make some bucks for themselves, most importantly now that you could possibly have tried it if you desired. The principles additionally worked as the easy way to be aware that most people have similar interest like my own to see a good deal more in regard to this condition. I am certain there are thousands of more enjoyable moments ahead for many who read through your website.

  17. Thanks for every one of your labor on this web page. Gloria takes pleasure in doing internet research and it is easy to understand why. All of us hear all regarding the powerful ways you offer great information by means of the blog and even attract participation from visitors on this subject plus our own child is always becoming educated a whole lot. Take pleasure in the remaining portion of the new year. You are always carrying out a good job.

  18. I together with my friends were looking at the best tips and hints from your site while before long came up with a terrible suspicion I never expressed respect to the site owner for those strategies. Those guys are already as a consequence passionate to read them and already have certainly been having fun with them. I appreciate you for genuinely indeed considerate and also for finding these kinds of great themes millions of individuals are really desperate to know about. My honest apologies for not saying thanks to sooner.

Leave a Reply

Your email address will not be published. Required fields are marked *