Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom RTE Para format, not working as expected #474

Open
AbhishekCaleb opened this issue Dec 4, 2024 · 2 comments
Open

Custom RTE Para format, not working as expected #474

AbhishekCaleb opened this issue Dec 4, 2024 · 2 comments

Comments

@AbhishekCaleb
Copy link

AbhishekCaleb commented Dec 4, 2024

Expected Behaviour

As per this https://experienceleague.adobe.com/en/docs/experience-manager-65/content/sites/administering/operations/configure-rich-text-editor-plug-ins#paraformats
if i add a new custom para format, it wraps the content in that tag. If I click on another format, it should remove the previous selection and add the new one.

eg; if i have new custom tag as 'testtag1'
the markup would be <testtag1>something</testtag1>
if i select now a different one, say h1, it should just replace.
like, <h1>something</h1>

Actual Behaviour

it keeps the newly added custom para format and wraps the new selection on top of it.
so the above markup , after selecting h1, would become,
<h1><testtag1>something</testtag1></h1>

Reproduce Scenario (including but not limited to)

tested with the aem-guides-wknd code , on a new aem instance (cloud/ local) and can reproduce the same on actual cloud as well.

Steps to Reproduce

  • add a new tag here ui.apps/src/main/content/jcr_root/apps/wknd/components/text/_cq_editConfig.xml
    around line 64 , after "pre" tag
    <default_subtitle jcr:primaryType="nt:unstructured" description="Subtitle" tag="subtitle"/>

  • next, go to ui.content/src/main/content/jcr_root/conf/wknd/settings/wcm/policies/.content.xml
    around line 342, after "pre" tag
    <item10 jcr:primaryType="nt:unstructured" description="Subtitle" tag="subtitle"/>

  • next, add the new tag in the xss protection config here, ui.apps/src/main/content/jcr_root/apps/cq/xssprotection/config.xml
    add <tag name="subtitle" action="validate"/> nearabout lines 845 , 850, where we are validating html tags.

Platform and Version

I've tested this on cloud version aem-sdk-2024.7.17258.20240726T172406Z-240700

Sample Code that illustrates the problem

code sample provided above

Logs taken while reproducing problem

No specific logs

Also: there is an experience league discussion link for the same
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/custom-paragraph-formats-in-rte-not-getting-removed-on-selecting/m-p/715416#M176680

@AbhishekCaleb
Copy link
Author

AbhishekCaleb commented Dec 4, 2024

Screenshot 2024-12-05 at 10 08 41 am

@AbhishekCaleb
Copy link
Author

AbhishekCaleb commented Dec 4, 2024

Screenshot 2024-12-05 at 10 14 07 am

after i change it to another format

Screenshot 2024-12-05 at 10 12 50 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant