Font Helvetica Neue is converted to "Helvetica Neue" when assigning to CSSStyleDeclaration.cssText
This works fine in IE and FF but not in chrome
Html
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
var x = myFunction();
document.getElementById("demo").innerHTML = x;
function myFunction() {
var body = document.body;
var style = body.style;
style.cssText = "font-size:small;font-family:Helvetica Neue"
return style.cssText.toString();
}
</script>
</body>
</html>
Steps to reproduce the problem: 1. Save the above html code and open in Chrome browser 2. It displays : font-size: small; font-family: "Helvetica Neue";
What is the expected behavior? It should display : font-size: small; font-family: Helvetica Neue;
What went wrong? The Helvetica Neue is getting displayed in double quotes when assigned to .cssText.
Because of this, in our rich text editor source code mode, the "Helvetica Neue" is getting displayed "Helvetica Neue"
When assigned the value Helvetica Neue to .cssText, it should convert simply Helvetica Neue but not as "Helvetica Neue".
If there is no space in between Helvetica Neue, then it is properly converting. But we need space in between Helvetica Neue
Is there any way to get the font without quotes?