Expand my Community achievements bar.

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

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

Richtext spell check save data without p tags

Avatar

Level 4

I have a dialog box 

<content
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/richtext"
removeSingleParagraphContainer="{Boolean}true"
useFixedInlineToolbar="{Boolean}true"
required="{Boolean}true"
fieldLabel="Content"
name="./content">
<rtePlugins jcr:primaryType="nt:unstructured" >
<htmlRules jcr:primaryType="nt:unstructured">
<blockHandling
jcr:primaryType="nt:unstructured"
removeSingleParagraphContainer="{Boolean}true"/>
</htmlRules>
<spellcheck
jcr:primaryType="nt:unstructured"
features="*"/>
</rtePlugins>
<uiSettings jcr:primaryType="nt:unstructured">
<cui jcr:primaryType="nt:unstructured">
<inline
jcr:primaryType="nt:unstructured"
toolbar="[spellcheck#checktext]">
</inline>
</cui>
</uiSettings>
</content>

I added this property removeSingleParagraphContainer="{Boolean}true" because it adding the data with p tags by default . After i added that property spell check doesn't work - It doesn't recognize the data entered - It always says no spelling issues found .. I am trying to have a spell check and save the data without p tags . Is there anything that needs to be modified or altered .. to make this work? 

4 Replies

Avatar

Community Advisor and Adobe Champion

@AEMnewbie,

There are many ways to tackle this problem, but here is one way to do it with Sling Models.

 

For Touch UI, You can create a custom paraformat option in the AEM Touch UI, cq/gui/components/authoring/dialog/richtext, and then using Java Backend, Sling Model, to text-transform the output, so that your Sightly HTL can render the output Html as expected. For the full tutorial you can find it here.

https://sourcedcode.com/blog/aem/aem-richtext-remove-p-tag-removesingleparagraphcontainer-for-touch-...

 

Avatar

Level 4

@BrianKasingli  Thats what i ended up doing .. I was just trying to see if this is something that could be controlled at the component level itself

Avatar

Community Advisor and Adobe Champion

Excellent, im glad that it worked out; unfortunately, there is no out of the box solution to fix this cause. A solution with javascript is just too troublesome. 

Avatar

Level 4

@BrianKasingli  Dont you think this is something that should be provided OOTB by AEM?