내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

component dialog options - is it possible to always show the richtext menu options?

Avatar

Level 2

There are a few scenarios where you can highlight text and the richtext menu options disappear.

 

Aside from web-accessibility concerns of showing and hiding page features there's actually a bug where if you highlight a word (in order to say, make it a link) and let go in a certain area (within the dialog but outside of the text area) the richtext options disappear s you can't make it a link.

 

Hiding them seems to be just an exercise in hiding the dialog complexity but in doing so can make entry more complex.

 

Attached zipped video example of issue.

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Hello @chebwin, Here you go. This solution should keep the RTE menu options always "visible".  

스포일러
Of course its is a customization 🙂

Note: This code is tested on AEM 6.5 SP 11 

 

I hope I did not introduce any typos. If you find any please point it out to me and I'll fix them in my post.

 

At a high level 2 things are necessary to achieve this,

1. Create a client library with a CSS and a JS custom script (code below)

2. Hook this client library into the extraClientlibs field.

 

The CSS:

 

.cq-dialog-content .rte-ui .rte-toolbar {
     visibility: visible!important;
}

 

 

The JS

 

(function (document, $) {
$(document).on("foundation-contentloaded", function(e) {
setTimeout(function(e){
$(".cq-dialog-content .rte-ui .rte-toolbar .rte-toolbar-item").addClass("is-disabled");
}, 1000);
});
})(document,Granite.$);

 

 

Link it to the component:

extraClientlibs="[<your-custom-clientlib-name>]"

 

 

thanks,

Preetpal

원본 게시물의 솔루션 보기

4 답변 개

Avatar

Level 10

Avatar

Community Advisor

Yes, we had a similar ask by the business team. Let me dig up that code and be right back with the implementation.

Avatar

정확한 답변 작성자:
Community Advisor

Hello @chebwin, Here you go. This solution should keep the RTE menu options always "visible".  

스포일러
Of course its is a customization 🙂

Note: This code is tested on AEM 6.5 SP 11 

 

I hope I did not introduce any typos. If you find any please point it out to me and I'll fix them in my post.

 

At a high level 2 things are necessary to achieve this,

1. Create a client library with a CSS and a JS custom script (code below)

2. Hook this client library into the extraClientlibs field.

 

The CSS:

 

.cq-dialog-content .rte-ui .rte-toolbar {
     visibility: visible!important;
}

 

 

The JS

 

(function (document, $) {
$(document).on("foundation-contentloaded", function(e) {
setTimeout(function(e){
$(".cq-dialog-content .rte-ui .rte-toolbar .rte-toolbar-item").addClass("is-disabled");
}, 1000);
});
})(document,Granite.$);

 

 

Link it to the component:

extraClientlibs="[<your-custom-clientlib-name>]"

 

 

thanks,

Preetpal

Avatar

Level 2

Thanks Preetpal! Tested this locally and it works fine 👍

 

Will need to test it's production ready for SP 17; a shame there's not a built in fix but I'm sure we'll go for this or something very similar