1

I'm looking for a way to allow content editors to add legal footnotes/disclosures within inline content. My initial thought was to instruct them to use some sort of syntax, such as [[disclosure=12.34]] which would require usage such as this within inline content fields:

The disclosure needs[[disclosure=12.34]] to be included within the inline content.

In this case, I would also create a global service or route-level component to crawl the content after page load to find all disclosure references. I need to require the disclosure content from a third-party API and, after receiving the response, replace the footnote syntax with a footnote index number.

So, my question is, is there a more conventional/convenient way of adding either a footnote component or tag of some kind within a jss content field? Any suggestion is appreciated.

  • I believe what you are asking for could be answered by a myriad of possibilities. The end result is that what you are describing is some kind of customized solution and a grouping of components. Theres a number of different approaches, but none of them appropriate for this site. – Pete Navarra Apr 20 '19 at 0:08
  • This is why I have voted this question to be closed. (I chose opinionated, but its also too broad) – Pete Navarra Apr 20 '19 at 0:09
0

The Sitecore TokenManager module can provide automated rich text token replacement. It's not JSS-specific, but should work with JSS.

  • I don't think that would fit my use case. It looks like that module allows tokens to be inserted that represent a fixed value. I need to allow content editors to add disclosures by id and then find those references client side in order to make an api request for the corresponding disclosure content. For example, if someone adds a disclosure id of "12.34", I would need to make an api request to our third-party for the legal content and render the result at the bottom of the page. I would then also need to replace the "12.34" reference with a footnote index, such as <sup>1</sup>. – Jbird Mar 20 '19 at 18:13
  • Apologies If I'm misunderstanding – Jbird Mar 20 '19 at 18:14
  • Taking a second looks, I think I may uderstand what you're suggesting which is that I could create tokens for each disclosure id. Unfortunately, the resulting sup tag needs to contain a footnote index which represents the disclosures' order of appearance on the page. – Jbird Mar 20 '19 at 18:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.