EditableDocumentFromBodyMarkupAndResourceFolder Method
Static factory, that creates an instance of EditableDocument from a specified HTML markup, that doesn't contain an HTML header, but only inner markup of HTML BODY element, and from resources, located in the folder, specified by the full path

Namespace: GroupDocs.Editor
Assembly: GroupDocs.Editor (in GroupDocs.Editor.dll) Version:
public static EditableDocument FromBodyMarkupAndResourceFolder(
	string htmlBodyContent,
	string resourceFolderPath


Type: SystemString
String, that contains raw HTML markup, which is located inside HTML->BODY element (without BODY itself), that should be parsed. Cannot be NULL, empty or invalid.
Type: SystemString
Mandatory path to the folder with resources. All stylesheets, which are located in this folder, will be used. Cannot be NULL or empty string, and this folder should exists.

Return Value

Type: EditableDocument
New non-null instance of EditableDocument
In general a well-formed HTML document contains an HTML Document Definition (DOCTYPE) and a root HTML element, that, in turn, has two and only two children: HEAD (with document meta-information) and a BODY (with document content). All stylesheets are included and/or embedded in the HEAD element (LINK and/or STYLE elements respectively), and are 'used by' content markup (by using 'class' and 'id' attributes, in most cases). However, most of client-side WYSIWYG HTML-editors like TinyMCE and CKEditor are working only with inner content of BODY element: they can obtain only such markup on input and produce such markup on output. For passing a HTML->BODY markup into the HTML-editor there is a GetBodyContent method. And, in counterpart, for obtaining HTML markup from HTML-editor this method exists. First string parameter obtains an inner content of HTML->BODY element, while 2nd parameter — resourceFolderPath — is a full path to the existing folder, that contains all HTML resources, used by HTML markup. GroupDocs.Editor will scan this folder and include all valid *.css files as stylesheets for the document.
See Also