Thanks mawtex and burningice.
I have C1 4.2 Update 1, so I have modified the corresponding files (I hope this is correct!), which are:-
~\Composite\services\SourceEditor\MarkupFormatService.asmx
Look for function GetXhtml5ConfiguredTidy()
Around line 196 find and comment out (or delete) the convert b to strong and convert i to em xsl code sections:-
This has stopped TinyMCE converting <i> to <em>.
And coupled with my additional workaround of adding an id="something" to <i> tags, this prevents the editor from removing the tags (although I have a feeling I have not applied the mod to MarkupFormatService.asmx or recompiled correctly as I think the AllowElementPruning option is supposed to leave the <link>, <meta> and <i> tags unmodified?).
Of course making these changes manually to source means I have to be vigilant when I upgrade to newer version of C1.
I have C1 4.2 Update 1, so I have modified the corresponding files (I hope this is correct!), which are:-
~\Composite\services\SourceEditor\MarkupFormatService.asmx
Look for function GetXhtml5ConfiguredTidy()
t.Options.QuoteNbsp = false;
t.Options.NumEntities = true;
// add following 2 lines
t.Options.AllowElementPruning = false;
t.Options.LogicalEmphasis = true;
// Feed tidy the html5 specific tags...
// add the "link", "meta" and "i" element names to the end of html5specificElementNames list as shown -->
List<string> html5specificElementNames = new List<string> { "article", "aside", "audio", "canvas", "command", "datalist", "details", "embed", "figcaption", "figure", "footer", "header", "hgroup", "keygen", "mark", "meter", "nav", "output", "progress", "rp", "rt", "ruby", "section", "source", "summary", "time", "video", "wbr", "link", "meta", "i" };
Also modify the file ~\Composite\transformations\WysiwygEditor_TinyContentToStructuredContent.xslAround line 196 find and comment out (or delete) the convert b to strong and convert i to em xsl code sections:-
<!-- convert b to strong -->
<!--<xsl:template match="x:b">
<strong>
<xsl:apply-templates select="@*|*|node()|text()" />
</strong>
</xsl:template>-->
<!-- convert i to em -->
<!--<xsl:template match="x:i">
<em>
<xsl:apply-templates select="@*|*|node()|text()" />
</em>
</xsl:template>-->
Then rebuild project.This has stopped TinyMCE converting <i> to <em>.
And coupled with my additional workaround of adding an id="something" to <i> tags, this prevents the editor from removing the tags (although I have a feeling I have not applied the mod to MarkupFormatService.asmx or recompiled correctly as I think the AllowElementPruning option is supposed to leave the <link>, <meta> and <i> tags unmodified?).
Of course making these changes manually to source means I have to be vigilant when I upgrade to newer version of C1.