Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

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!

1 ACCEPTED SOLUTION

Hi @AishwaryaSB 

No mate, there's no OOTB way to do this in Workspace. The reason is that Workspace is built on a different technology stack and is primarily based on CSS for UI styling. HTML and JavaScript are handled differently in the backend, so making changes in Workspace requires customization.

Since this isn't supported out of the box, you'll need to customize it if that's the requirement. Also, if your goal is to display static text to users, let me know exactly what you're trying to achieve, and we can look at the best approach.

*************************************************************************************************************
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

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

View solution in original post

5 REPLIES 5

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