internet explorer - SVG text element with whitespace not preserved in IE -


i want preserve white space in single svg < text> element.

this works fine xml:space="preserve" attribute in text element in ie browser.

  <text x="0" y="15" fill="red" xml:space="preserve">i     love     svg!</text> 

here jsfiddle, try open fiddle in chrome/firefox , in latest ie, notice whitespace in text element text not preserved in ie.

jsfiddle

any workaround works in ie well?

i guess replace each space &#160; (that's unicode non-breaking space character).

in javascript written \u00a0 though.


Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

sql - The object name contains more than the maximum number of prefixes. The maximum is 2 -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -