Page tree
Skip to end of metadata
Go to start of metadata

Set image properties of the selected image.


Parameters:

NameTypeDescription
actionNameString'changeDrawingObjectProperties' image properties setting API
propertiesObject

{ style: {Object} }


Example:

editor.execCommand('changeDrawingObjectProperties', {
	style: {
        border: {
            style: 'solid', // solid, dotted, dashed, double
            width: 3,
            color: { r: 255, g: 0, b: 0 }
        }
	}
}); // Set border style

editor.execCommand('changeDrawingObjectProperties', {
	style: {
        float: 'left'  // none, left, right
	}
}); // Set float properties

editor.execCommand('changeDrawingObjectProperties', {
	style: {
        margin: {
            left: 10,
            right: 10,
            top: 10,
            bottom: 10,
        }
	}
}); // Set margin properties

editor.execCommand('changeDrawingObjectProperties', {
	style: {
        verticalAlign: 'top'  // top, middle, bottom, baseline
	}
}); // Set vertical align properties

editor.execCommand('changeDrawingObjectProperties', {
	style: {
        width: {
            value: 100,
            unit: 'px'
        }
        height: {
            value: 100,
            unit: 'px'
        }
	}
}); // Set width, height properties
  • No labels