Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

aem6.5 richtext modify textarea size

Avatar

Level 4

The default textarea is too large. How can I modify the size of the textarea by some fields? Is it possible? Or I must overwrite it and use js to modify it?

Johann_Lu_0-1667803185126.png

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Johann_Lu , you can create a custom client library that will only be invoked when you are on the editors.html page. The custom client library should contain CSS that will target the Touch UI RTE, and in summary, shrink down the textarea, as what you are expecting. To create a custom client library specifically for the editors.html page, you can follow this blog article -> https://sourcedcode.com/blog/aem/adding-custom-client-library-for-aem-author-editor-touch-ui

 

View solution in original post

2 Replies

Avatar

Community Advisor

@Johann_Lu It is possible to override the js/css by targetting the element - something like -

$("[name*='/<fieldname>/']").css("height", "200px");

But not sure, if this this the only way.

Avatar

Correct answer by
Community Advisor

@Johann_Lu , you can create a custom client library that will only be invoked when you are on the editors.html page. The custom client library should contain CSS that will target the Touch UI RTE, and in summary, shrink down the textarea, as what you are expecting. To create a custom client library specifically for the editors.html page, you can follow this blog article -> https://sourcedcode.com/blog/aem/adding-custom-client-library-for-aem-author-editor-touch-ui