All, I have a problem statement where webhe have supposed to show ® as superscript.But this has not been aded by content author so now am trying to update dynamically . Is there any suggested approach
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
@samr99530769, you can inject this XML block into your touchUI cq_dialog.xml
<subsuperscript
jcr:primaryType="nt:unstructured"
features="*"/>
Full list of richText options can be found here, https://gist.github.com/briankasingli/1a7e3e12deaa2e076645b09d30039b46
@samr99530769 To update the content programmatically, you can create a custom servlet which can take content path as input and then using QueryBuilder/ QueryManger find all the nodes under the specified path that contains the character to be superscripted.
Iterate through the list of nodes and parse the "text" property and update the property adding <sup> </sup> tags around the character using string operations. Save the node and replicate if needed.
Query would be something like this: SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content/<your-site-path>]) and CONTAINS(s.*, '<string to be superscripted>')
Superscript is a plugin that is available in RTE. You can enable and author it as per your requirement.
Advantages:
Authoring activity
No code changes
One time activity
No technical knowledge needed
Disadvantages:
Time-consuming
If you want to add it programmatically, you need to search the nodes that need the tag to be added and update the node.
Pros:
Less time consuming
Cons:
Depending upon the content, the updation might take time and might impact the server performance
As this is one-time activity (hopefully) the code is useless next time
Thanks,
Kiran Vedantam
Hi @samr99530769,
You can install the package that contains a Touch UI component that uses the RTE including superscript tag plugin as described in below documentation link.
More details at:
Thanks!!
@samr99530769, you can inject this XML block into your touchUI cq_dialog.xml
<subsuperscript
jcr:primaryType="nt:unstructured"
features="*"/>
Full list of richText options can be found here, https://gist.github.com/briankasingli/1a7e3e12deaa2e076645b09d30039b46
Views
Likes
Replies