I have HTML rect element that i am creating dynamically from the TS file. I want to add text inside the shape, how can i dot it?
current code:
const toolTipNode = this.createSvgElem('rect', {
'x': elementPositionX,
'y': elementPositionY,
'width': '300',
'height': '100',
'class': 'click-tooltip'
});
this.renderer.appendChild(this.layoutSvg, toolTipNode);
[EDIT]
Let say that I create in the same way a text element, How can i add the text inside?
const text = this.createSvgElem('text', {
'x': elementPositionX,
'y': elementPositionY,
'width': '300',
'height': '100',
'class': 'click-tooltip'
});