# How to Get Selected Text in Rich Text Editor?

**URL:** <https://community.weweb.io/t/how-to-get-selected-text-in-rich-text-editor/9905>\
**Category:** Ask us anything\
**Tags:** design\
**Created:** [July 24, 2024, 11:01am UTC](https://community.weweb.io/t/how-to-get-selected-text-in-rich-text-editor/9905 "2024-07-24T11:01:57Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![saulo260](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@saulo260](https://community.weweb.io/u/saulo260)\
**Post date:** [July 25, 2024, 5:17pm UTC](https://community.weweb.io/t/how-to-get-selected-text-in-rich-text-editor/9905/4 "2024-07-25T17:17:17Z")

</div>

Hi @jptrinh

Yes, @GeovanyFerreira answered my question yesterday in a community here in Brazil and made an incredible tutorial that solved my challenge! I am very grateful to him.

Unfortunately, there are still other posts in the community that weren’t as lucky as I was and remain unanswered for quite some time, even with **many views** :

- [Cursor Position for New Rich Text Element](https://community.weweb.io/t/cursor-position-for-new-rich-text-element/1205) **(with 1.9k views)**
- [Dynamically add text inside rich text editor](https://community.weweb.io/t/dynamically-add-text-inside-rich-text-editor/8225) **(with 199 views)**

It would be very helpful for the community if the Weweb team could share a tutorial on rich text, addressing how to **insert text at the cursor position** and **how to replace paragraphs** with another paragraph suggested by ChatGPT. These are basic functionalities for anyone looking to develop text, chat, and copywriting platforms that use artificial intelligence, like ChatGPT.

I emphasize the importance of this due to the increasing demand for applications integrated with ChatGPT.

Would it be possible for the Weweb team to produce a tutorial?

Also, I want to highlight the great contribution of the Weweb team with this incredible platform that has achieved so much.

Thank you very much!

---

_[View the full topic](https://community.weweb.io/t/how-to-get-selected-text-in-rich-text-editor/9905)._
