Closed DynaSpan closed 3 years ago
Normally, I recommend to define your document by editing the predefined Word-styles and then, push the converted HTML into that document. Another way is to rely on CSS class that match Word custom-styles.
I am curious why these 2 above solutions didn't give you satisfaction and you need more control?
In my specific use-case, I generate a Word document from a lot of HTML & pre-existing Word documents.
The HTML is generated from WYSIWYG editors, which don't always have the option to define default classes (e.g. for tables). My Word documents use a base style document, on which all content is copied.
In my example, this base style document also has a table style. However, this style is not named "TableGrid" as it would mess with tables from pre-existing Word documents that are merged into the new document.
Therefore, it would be nice if we could specify default styles for items, such as a table.
Ok sound good to me. Thanks for the explanation, I will update the wiki accordingly
This PR allows end users to define default styles for diverse items:
This can be useful if we're using WYSIWYG editors, where changing classes of items can not be simple.
Breaking changes: The fields
DefaultParagraphStyle
andDefaultStyle
have been removed fromHtmlDocumentStyle.cs
.