copyStyles()
Description
Copies styles of the specified element or the first element from the selection list
Usage
copyStyles(id?: string | number): void;
Parameters
id
- (optional) the id of an element selected for copying styles
Example
- call the method without arguments to copy styles of the first element from the selection list
const editor = new dhx.DiagramEditor("editor_container", {
type: "default",
});
// ...
editor.model.copyStyles(); // copies styles of the first element from the selection list
- pass the id of some element to the method to copy its styles
const editor = new dhx.DiagramEditor("editor_container", {
type: "default",
});
// ...
editor.model.copyStyles("1"); // copies styles of the specified element
Change log: Added in v6.0