Workspace - Auto-resize read only HTML field (now-record-html-editor) in Zurich/Yokohama

AishwaryaSB
Tera Contributor

Hi Everyone,

 

I'm working on a requirement where an HTML field is displayed in a Workspace Record Form in read-only mode.  I have verified the behavior in both Zurich and Yokohama release. The field is rendered using the out-of-the-box 'now-record-html-editor' component.

 

The dictionary attribute 'editor.height' successfully changes the display height. Our requirement is for the the HTML field to automatically resize based on its content, so users don't see a vertical scrollbar.

 

I'd like to know:

1) Is there any supported out-of-the-box configuration or dictionary attributes to enable auto-resizing of a read-only HTML field in Workspace?

2) Has anyone implemented this requirement without customizing the out-of-the-box Workspace component?

3)If there is no out-of-the-box support, is a Workspace customization (custom component or client customization) the recommended approach?

 

Any guidance or best practices would be greatly appreciated.

 

Thank you!

4 REPLIES 4

Ankur Bawiskar
Tera Patron

@AishwaryaSB 

I don't think anything available OOTB for this

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Dr Atul G- LNG
Tera Patron

Hi @AishwaryaSB 

No, this is not available out of the box. What is the use case for utilising it?

Also, the workspaces are not in native form, and the technology used in the backend is different from the native format. So understanding the use case might help us guide you better.

 
*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

Hi @Dr Atul G- LNG ,

 

Thank you for your response.

 

The HTML field contains formatted guidance/instructions and is dsplayed in the read only mode in Workspace. Some records have longer content, which results in a vertical scrollbar due to fixed display height.

 

The requirement is for the field to automatically expand based on the content so users can read the complete text without scrolling inside the field.

 

Since editor.height only supports a fixed height, I wanted to check whether there is any supported approach to achieve auto resizing in workspace. We generally prefer to stay with OOB functionality. I was considering whether a Workspace client customization could dynamically adjust the height, but i wanted to check if anyone has implemented a supported solution before exploring that approach.

Tanushree Maiti
Tera Patron

Hi @AishwaryaSB 

 

Refer post : 

1)How to increase HTML field height in Workspace? 

https://www.servicenow.com/community/developer-forum/increase-height-of-description-field-in-case-ta...

 

 

2) Resizing a field on a form 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti