.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip::before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action::after{border-right:1px solid #ccc;content:'Edit';.ql-snow .ql-tooltip a.ql-action2::after{border-right:1px solid #ccc;content:"Cancel";}
Is there any online site that converts HTML, or CSS into string, to play everything inside a variable? For example:
I put this in the form:
body {
margin:0;
padding: 0;
}
It would return me something like this, doing all escape deal:
var css = 'body{margin:0;padding:0}';
If it were in PHP, I would do so:
$var = <<<END
.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip::before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action::after{border-right:1px solid #ccc;content:'Edit';.ql-snow .ql-tooltip a.ql-action2::after{border-right:1px solid #ccc;content:"Cancel";}
END;
I need to do this to generate a PDF:
var valor1 = 'aqui viria o css minificado com as aspas escapada';
var valor2 = 'mais CSS aqui...';
$('.main').prepend('<style type="text/css">' + [
valor1,
valor2
].join('') + '</style>');
OBS: My question is clear, the problem is that people do not understand, and so I'm having to add more information, to clarify for those who can not understand what is obvious:
1 - I'm not looking for a solution to minify CSS
2 - I'm looking for a solution to play the mined CSS inside a variable with a string inside quotation marks.
3 - I do not want to do the string manually (that is, I do not want to type it), I want to generate a string in the string format and not its value.