How to add default value to dropdown field in the block of universal editor | Community
Skip to main content
Level 2
March 26, 2025
Question

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

  • March 26, 2025
  • 3 replies
  • 561 views

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 

3 replies

DyanamicAuthor
Level 2
March 27, 2025

@2213647 

 

arunpatidar
Community Advisor
Community Advisor
March 27, 2025

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." } } ] }

 

 

Arun Patidar
DyanamicAuthor
Level 2
March 27, 2025

Tried the above mentioned solution it is not working.

kautuk_sahni
Community Manager
Community Manager
August 20, 2025

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

Kautuk Sahni