content fragment strikethrough node type on graphql query | Community
Skip to main content
Level 4
June 13, 2024

content fragment strikethrough node type on graphql query

  • June 13, 2024
  • 3 replies
  • 1664 views

Hi team,

        We are in AEMasCS, we implemented strikethrough plugin in our contentfragment  RTE model, while explore the graphql json data, we are getting the "nodeType" as "span" instead of nodeType as "strikethrough", kindly let us know is there any option to change the "nodeType" as "strikethrough", pfb our graphql json data.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

arunpatidar
Community Advisor
Community Advisor
June 13, 2024

Hi @rajat168 
Could you please check, how the data is stored in the JCR? with span Tag or with strikethrough Tag?

Arun Patidar
rajat168Author
Level 4
June 13, 2024

Hi @arunpatidar , thanks for your response, its stored as <span> tag. but we need the tag as <strikethrough>

 

arunpatidar
Community Advisor
Community Advisor
June 13, 2024

Hi @rajat168 
Then you need to check your RTE custom plugin implementation, you might be saving content using span instaedof strikethrough Tag.

Arun Patidar
h_kataria
Community Advisor
Community Advisor
June 13, 2024

As Arun mentioned, this is because of the way strikethrough plugin is implemented on your side. If it is span tag, then you are bound to get span in the json representation along with the class in data key and as far as I know, I don't think there will be any easy way to change that JSON structure but I think the Front end layer which is consuming that json can easily adapt logic to use the "strikethrough" class which you have implemented.
You can also check if you pass your description as html instead of json in your query which can be consumed rather easily compared to the json.

description { html }
kautuk_sahni
Community Manager
Community Manager
June 19, 2024

@rajat168 Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
rajat168Author
Level 4
June 19, 2024

Hi @kautuk_sahni , still i could not find any solution, i was still struck up with the solution, appreciate if any forum team member will help on this.