aem6.5 richtext modify textarea size | Community
Skip to main content
Level 4
Nov 7, 2022 6:40 AM UTC
Solved

aem6.5 richtext modify textarea size

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?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
BrianKasingli
BrianKasingliAccepted solution
New Participant
Nov 7, 2022 7:26 AM UTC

@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

 

2 replies

BrianKasingli
BrianKasingliAccepted solution
New Participant
Nov 7, 2022 7:26 AM UTC

@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

 

Translate
Manu_Mathew_
New Participant
Nov 7, 2022 6:57 AM UTC

@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.

Translate