Change the default "size" / height of HTML field on form

Shane Butler
Tera Guru

Hi Community,

We have an issue on our Change Request form where we have introduced a custom field (HTML type) and when the form loads, the HTML field needs to be expanded to show all of the content in the "default" value.

Any Guru able to shed some light on how to adjust the default size / height of the HTML form field so the content shows?
I am aware of the user options 1 and 2 below once the form loads - however I am chasing a more permanent fix for all users rather than a record by record once it is loaded.

Would appreciate any assistance / guidance 😄

find_real_file.png

11 REPLIES 11

Raymond8
Tera Contributor

Better to set the style as height:100% !important;

I'm having the same problem in the Demand table's "Business Case" tab.  I tried creating a Style as suggested, but nothing happens.  Any suggestions on what I'm doing wrong?  This is in Tokyo build.

 

DavidLundy_0-1677524264328.png

 

Setting the style without !important; doesn't work either.

I'm having the same problem. Apparently this is "Expected Behavior" as of Tokyo - make sure you provide feedback on this knowledge article. They acknowledge that the behavior is different than what users expect but don't provide any workaround.

Jesper Slot
Tera Guru

Bit of an old post, but others might stumble upon it...
I found that you can set the dictionary attribute (as has been suggested here) to a maximum of "435", so: editor.height=435

.. of cause I started with 1000, so that didn't work, but up till 435 does. 

But additionally, if a user has resized the window (which I had with my admin user), there will be a user property, so go to sys_user_preference_list.do and search for *tinymce_height.tablename and remove those, as whey will override your dictionary attribute.

Peter Bodelier
Giga Sage

Hi @Shane Butler 

 

Create an onload Client script on change_request table.

function onLoad() {

tinymce.on('addeditor', function(event) {
  var selectedElement = tinymce.get('change_request.u_description');
    selectedElement.settings.height = 700;
    selectedElement.settings.max_height = 1500;
    selectedElement.settings.min_height = 1000;
}, true);		

}

Please check the field name in the script. I've used u_description for now.

This should result in a larger editor:

PeterBodelier_0-1693228390954.png

 

 


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.