Skip to content

Clone

Creates a clone of the document model.

1
myWriter.Clone(cloneDescendants?: boolean):Writer

Parameters

boolean cloneDescendants optional
    When true, clones the document's child elements as well. Defaults to false.

Returns

The copy of the document.

Examples

Create a copy of a document with its content

1
2
3
4
var writer = new Writer();
writer.LoadText('<h1>Offer</h1><p>Draft</p>', 'html');

var copy = writer.Clone(true);

See Also