A rectangle with an HTML label (with a fallback to SVG label for IE).

Supported attrs properties

Selector Node Description
root SVGGElement Container of all nodes
body SVGRectElement Rectangular body of the shape
label HTMLDivElement Text inside the body
var textBlock = new joint.shapes.tandard.TextBlock();
textBlock.resize(100, 100);
textBlock.position(250, 610);
textBlock.attr('root/title', 'joint.shapes.standard.TextBlock');
textBlock.attr('body/fill', 'lightgray');
textBlock.attr('label/text', 'Hyper Text Markup Language');
// Styling of the label via `style` presentation attribute (i.e. CSS).
textBlock.attr('label/style/color', 'red');
textBlock.addTo(graph);