2
votes

I'm trying to embed some renderings as detailed in this article. However when I try to add a rendering into a Rich Text field I get XHTML validation errors. I can't disable XHTML validation for the client so I wanted to extend the schema used for validation. This is stored in the /sitecore/shell/schemas directory.

The markup for the rendering I'm trying to embed is:

<smart:addresssnippet runat="server" />

I've tried to add a new schema for the smart namespace but this doesn't seem to work. When I go back to the HTML for the Rich Text field Sitecore has rewritten the code to be:

<smart:addresssnippet runat="server" xmlns:smart="http://www.sitecore.net/xhtml"></smart:addresssnippet>

This fails validation. Has anyone encountered this or a way to add renderings to the validation schema?

2
Can you specify which version of sitecore you are using? The telerik radeditor has been upgraded in 6.4.chrislewisdev

2 Answers

2
votes

I've tested adding the following xml on my local instance to sitecore\shell\Schemas\xhtml.xsd and it renders you tag as you wanted and does not have validation errors in the Rich Text Editor.

  <xs:element name="smart:addresssnippet">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
      </xs:choice>
    </xs:complexType>
  </xs:element> 
0
votes

I would contact Sitecore support here (provided you have a login for it) or maybe you could also try here.