HTML Tags like <center> in Topic - Conceptual Content

Topics: Developer Forum, User Forum
Sep 24, 2008 at 7:11 AM
Edited Sep 24, 2008 at 7:13 AM
I'm creating Topics with SHFB 1.7.0. My Problem is, that i try to center an image, what i have inserted in content of a section like this:

<image xlink:href="e0a7384a-13c7-44dd-aa02-73eee1e2ed72"/>

The HTML <center> tag doesn't work. Also i have tried a lot of html tags like <div>, <p>, <span> and text-align parameter. Nothing worked. My question is also, where i find the supported tags in Topic Editor (like <image> what i have only found per Drag&Drop the image). Stylesheets like style="text-align:center" also doesn't work. I also want to edit the width of the image, but attribute like <image ... width="700"/> doesn't work. Can somebody help me. Is there a possibility to insert in the editor arbitrary html tags? Thanks for your help.
Sep 24, 2008 at 3:08 PM
MAML is XML that conforms to a well-defined schema and is ran through a set of XSL transformations to output HTML.  Regular HTML tags are not recognized and are ignored when the topics are compiled.  If you haven't done so already, install the patch found at the Sandcastle Styles project site as it extends the MAML supported by Sandcastle to include options to align images and many other features.  At the same site, you will find a MAML Guide that describes most of the common tags that you can use to achieve similar formatting in MAML.

If you get really stuck and absolutely need some HTML, you can wrap it in <markup> and </markup> tags (after installing the noted patch) which will pass it through as literal HTML.  However, you shouldn't need to use it as there are equivalents for just about all of the common formatting and layout options.  Whenever possible, which is the vast majority of the time, use the MAML elements.  Image sizing is currently a limitation.  You'll have to size the image in the file itself rather than using attributes on the MAML image element to resize it in the document.  The transformations could be extended to support it though.  You can add a work item at the Sandcastle Styles project site and we can look into it.

Sep 25, 2008 at 9:15 AM
Thank you very much for your help. The Guide was exactly that what I'm searching for.