1

We're about to implement some changes/restrictions on the Rich Text Editor Profile for our SXA solution. We're also exploring the possibility for letting this be controlled in some way, by the user who is using it.

In investigating this, I noticed that SXA configures Rich Text fields with the following source (so Profile) query:$xaRichTextProfile. Where is this ultimately resolved, and is there an in-application way to set this up OOTB without patching token resolver processors etc?

We're on SXA 1.9, Sitecore 9.2

1

Open the Sitecore.XA.Foundation.Editing.config and you will find there following processor in the resolveTokens pipeline:

<resolveTokens>
    <processor type="Sitecore.XA.Foundation.Editing.Pipelines.ResolveTokens.ResolveEditingTokens, Sitecore.XA.Foundation.Editing" resolve="true" />
</resolveTokens>

This processor simply replaces the $xaRichTextProfile with path to the profile. This path is defined in the same file, the setting is called XA.Foundation.Editing.DefaultRichTextProfile.

If you want to allow users to change that, simply add a field somewhere with e.g.: a path to a custom profile. Then replace this processor with one which instead of reading setting will get profile path form that custom field.

  • mmh... but then how is this different than the OOTB setting; <setting name="HtmlEditor.DefaultProfile" value="/sitecore/system/Settings/Html Editor Profiles/Rich Text Full"/>? – Mark Cassidy Dec 9 '19 at 7:00
  • Or maybe I should ask; why go through the trouble of adding a token resolver and a new setting, only to end up in a zero sum game with what Sitecore already offers? – Mark Cassidy Dec 9 '19 at 7:01
  • You asked where it is resolved and most part of the above text answers that. There is no out of the box "user-friendly" way to change it. But with a custom field somewhere you can e.g.: make it configurable per site. – Dawid Rutkowski Dec 9 '19 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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