Skip to main content
Level 2
Mar 26, 2025 1:36 PM UTC
Question

How to add default value to dropdown field in the block of universal editor

Hi everyone,

I have a requirement for the blocks in the universal editor where for richtext editor I have to limit the text till 100 char, in the dropdown I have to show sone option by default selected. how can we achieve this. 

for text fild I tried 

"validation": {
"maxLength": 100
} and it works. but for richtext it is not working.

 

Thank you 

@1931634 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

DyanamicAuthor
Level 2
Mar 27, 2025 7:58 AM UTC

@2213647 

 

Translate
arunpatidar
Community Advisor
Community Advisor
Mar 27, 2025 8:02 AM UTC

Hi @dyanamic 

Can you please check here

 

 

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/universal-editor/field-types#rich-text  - Sample 2

 

{ "id": "another-richtext", "fields": [ { "component": "richtext", "name": "rte", "label": "Rich Text", "valueType": "string", "validation": { "maxSize": 1000, "customErrorMsg": "That's about as funny as a screen door on a battleship." } } ] }

 

 

Translate
Arun Patidar
DyanamicAuthor
Level 2
Mar 27, 2025 8:56 AM UTC

Tried the above mentioned solution it is not working.

Translate
kautuk_sahni
Level 9
Aug 20, 2025 9:59 AM UTC

@dyanamic Just checking in, were you able to resolve your issue? We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it, Your insights could really benefit the community. Thanks again for being part of the conversation!

Translate
Kautuk Sahni