How to Auto-expand Knowledge Text Field?

TylerTeter
Kilo Guru

Is it possible to auto-resize the text field in the Knowledge Article to display as large as possible from the beginning? Most knowledge articles are longer than the default display size, and it would save steps/time/usability if this change was possible. I notice that if you do an HTML inspect element on the '+' button shown in the screenshot below, the following call is made - onclick="textareaSizer_Resize('kb_knowledge.text', +60);"

I tried replicating the function in a client script (no success), and feel close to the solution but I'm not sure how to properly call the function! Any help would be appreciated, thanks!

find_real_file.png

1 ACCEPTED SOLUTION

Mike6
Giga Contributor

Hi Tyler,



You might already have the solution but in case you haven't or someone else is struggling with the same issue, then this article from SNC Guru might be of help.


Automatically adjust the height of text area to fit contents - ServiceNow Guru


View solution in original post

4 REPLIES 4

Deepak Ingale1
Mega Sage

Could you please share screenshots of the script you are trying to work upon?


Sure thing! It's extremely barebones right now, but here you go!


find_real_file.png



Also see below for the inspect element Javascript code it was calling.


find_real_file.png


Mike6
Giga Contributor

Hi Tyler,



You might already have the solution but in case you haven't or someone else is struggling with the same issue, then this article from SNC Guru might be of help.


Automatically adjust the height of text area to fit contents - ServiceNow Guru


Mike,



I didn't actually find the solution so I halted development on it, but thank you for that Article! I think that will solve my problem!



Sincerely,


Tyler