Created
July 8, 2014 16:30
-
-
Save vicapow/cd2046770ceea172d4db to your computer and use it in GitHub Desktop.
testing newlines in svg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1> svg text with multiple text elements</h1> | |
<svg width="400" height="400"> | |
<text y="100"> | |
<tspan x="0" dy="1.4em"> | |
wow this is cool | |
</tspan> | |
<tspan x="0" dy="1.4em"> | |
new line! | |
</tspan> | |
</text> | |
</svg> | |
<h1> svg text element with a newline (fail)</h1> | |
<svg width="400" height="400"> | |
<text y="100">wow this is cool | |
new line!</text> | |
</svg> | |
<h1> svg txt with an html newline entity (fail)</h1> | |
<svg width="400" height="400"> | |
<text y="100"> wow this is cool 
 new line! </text> | |
</svg> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment