HtmlSaveOptions.CssClassNamePrefix
HtmlSaveOptions CssClassNamePrefix property. Specifies a prefix which is added to all CSS class names. Default value is an empty string and generated CSS class names have no common prefix.
HtmlSaveOptions.CssClassNamePrefix property
Specifies a prefix which is added to all CSS class names. Default value is an empty string and generated CSS class names have no common prefix.
public string CssClassNamePrefix { get; set; }
Exceptions
exception | condition |
---|---|
ArgumentException | The value is not empty and is not a valid CSS identifier. |
Remarks
If this value is not empty, all CSS classes generated by Wordize will start with the specified prefix. This might be useful, for example, if you add custom CSS to generated documents and want to prevent class name conflicts.
If the value is not null
or empty, it must be a valid CSS identifier.
Examples
Shows how to specify a prefix which is added to all CSS class names.
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.CssClassNamePrefix = "mycss_";
htmlSaveOptions.CssStyleSheetType = HtmlCssStyleSheetType.External;
htmlSaveOptions.CssStyleSheetFileName = "my_styles.css";
Converter.Create()
.From(MyDir + "Simple.docx")
.To(ArtifactsDir + "HtmlSaveOptions.CssClassNamePrefix.html", htmlSaveOptions)
.Execute();
See Also
- class HtmlSaveOptions
- namespace Wordize.Saving
- assembly Wordize