How can I set a multiple text lines in Cytoscape.JS node content?
cytoscape.js, javascript
Solution
In your stylesheet:
text-wrap: wrap;
label: 'My multiline\nlabel';
See http://js.cytoscape.org/#style/labels
Problem
I have some cytoscape nodes with ``` style: cytoscape.stylesheet() .selector('node') .css({ 'border-color': '#0266C8', 'border-width' : '1px', 'shape': 'data(faveShape)', 'width': '80px', 'font-family' : 'Consolas', 'font-size' : '10px', 'content': 'data(id)', 'text-valign': 'center', 'background-color': 'data(faveColor)', 'color': 'data(textColor)' }) ... ``` How can I have a content with two or more lines and 2 or more concatenated strings? ``` ... 'content': 'data(id)' + '<br>' + data('name') + '<br>test123', ... ``` TIA