# Customize freetext tool to change text and behavior programatically

**URL:** <https://pdfjs.community/t/customize-freetext-tool-to-change-text-and-behavior-programatically/94>\
**Category:** Technical Support\
**Created:** [June 26, 2020, 7:35am UTC](https://pdfjs.community/t/customize-freetext-tool-to-change-text-and-behavior-programatically/94 "2020-06-26T07:35:21Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![rabiraj](https://avatars.discourse-cdn.com/v4/letter/r/c37758/32.png) [@rabiraj](https://pdfjs.community/u/rabiraj)\
**Post date:** [June 30, 2020, 12:34am UTC](https://pdfjs.community/t/customize-freetext-tool-to-change-text-and-behavior-programatically/94/5 "2020-06-30T00:34:46Z")

</div>

That did not work as well. The event is not getting triggered even with  
this.wvInstance.docViewer.getAnnotationManager().getEditBoxManager().on(‘editorFocused’, (editor, annotation) =\>

Also, following has not changed initial text  
Tools.FreeTextCreateTool.prototype.initialText = ‘REDACTED’

---

_[View the full topic](https://pdfjs.community/t/customize-freetext-tool-to-change-text-and-behavior-programatically/94)._
