Skip to main content

Copy manager API overview

A set of APIs that you can use when copying and pasting items of the Diagram Editor. Use the model keyword to access the Copy manager via the editor object:

const editor = new dhx.DiagramEditor("editor_container", { 
type: "default" // only default
});
// ...
editor.model.copy(); // copies selected items

Copy manager methods overview

NameDescription
copy()Copies selected elements or elements specified by ids
copyStyles()Copies styles of the specified element or the first element from the selection list
paste()Creates new elements identical to the elements passed by the "copy()" method
pasteStyles()Applies copied styles to the list of selected elements or elements specified by ids