# Need help to \*\*getSelected\*\* and \*\*replace\*\* from Toolbarevent

**URL:** <https://meta.discourse.org/t/need-help-to-getselected-and-replace-from-toolbarevent/226905>\
**Category:** Development\
**Created:** [May 13, 2022, 12:01am UTC](https://meta.discourse.org/t/need-help-to-getselected-and-replace-from-toolbarevent/226905 "2022-05-13T00:01:20Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![bksubhuti](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bksubhuti/32/254360_2.png) [@bksubhuti](https://meta.discourse.org/u/bksubhuti)\
**Post date:** [May 14, 2022, 11:32am UTC](https://meta.discourse.org/t/need-help-to-getselected-and-replace-from-toolbarevent/226905/4 "2022-05-14T11:32:57Z")

</div>

I am not sure this is what I want. I just want to call a few javascript calls. I think I see them but the toolevent only gives access to a small set of calls.

I can gettext and addtext, but not much else.  
I’m looking for functions that mimic this functionality:  
`getselectedtext`  
`replaceselectedtext`

I think this should be available.

---

_[View the full topic](https://meta.discourse.org/t/need-help-to-getselected-and-replace-from-toolbarevent/226905)._
