Aspose::Words::Loading::HtmlLoadOptions::get_BlockImportMode method
HtmlLoadOptions::get_BlockImportMode method
Gets or sets a value that specifies how properties of block-level elements are imported. Default value is Merge.
Aspose::Words::Loading::BlockImportMode Aspose::Words::Loading::HtmlLoadOptions::get_BlockImportMode() const
Examples
Shows how properties of block-level elements are imported from HTML-based documents.
const System::String html = u"\r\n <html>\r\n <div style='border:dotted'>\r\n <div style='border:solid'>\r\n <p>paragraph 1</p>\r\n <p>paragraph 2</p>\r\n </div>\r\n </div>\r\n </html>";
auto stream = System::MakeObject<System::IO::MemoryStream>(System::Text::Encoding::get_UTF8()->GetBytes(html));
auto loadOptions = System::MakeObject<Aspose::Words::Loading::HtmlLoadOptions>();
// Set the new mode of import HTML block-level elements.
loadOptions->set_BlockImportMode(blockImportMode);
auto doc = System::MakeObject<Aspose::Words::Document>(stream, loadOptions);
doc->Save(get_ArtifactsDir() + u"HtmlLoadOptions.BlockImport.docx");
See Also
- Enum BlockImportMode
- Class HtmlLoadOptions
- Namespace Aspose::Words::Loading
- Library Aspose.Words for C++