# Replace whole content of user's chat input

**URL:** <https://staging-discuss.dev.twitch.com/t/replace-whole-content-of-users-chat-input/46662>\
**Category:** Chat and IRC\
**Created:** [July 31, 2023, 5:25pm UTC](https://staging-discuss.dev.twitch.com/t/replace-whole-content-of-users-chat-input/46662 "2023-07-31T17:25:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CaptSiro](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/captsiro/32/25582_2.png) [@CaptSiro](https://staging-discuss.dev.twitch.com/u/CaptSiro)\
**Post date:** [July 31, 2023, 5:25pm UTC](https://staging-discuss.dev.twitch.com/t/replace-whole-content-of-users-chat-input/46662/1 "2023-07-31T17:25:08Z")

</div>

I’m developing a small Chrome extension and I need to read (could be done with only: `chatInput.textContent`) and change the value of the user’s chat input. When I get the current slate-leaf and change its textContent it does not save even on dispatching keydown or input event. Is there any way to replace the whole chat input?

[This answer did not work for me](https://staging-discuss.dev.twitch.com/t/solved-how-to-set-value-of-chat-input-textarea/15746)

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [August 30, 2023, 5:26pm UTC](https://staging-discuss.dev.twitch.com/t/replace-whole-content-of-users-chat-input/46662/2 "2023-08-30T17:26:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
