JavaScript: how to add CSS style tag with settings to DOM
2020-01-13
Native JS
oStyleAppend = function (content) {
oStyle = document.createElement('STYLE');
oStyle.type = 'text/css';
oStyle.appendChild(document.createTextNode(content));
document.head.appendChild(oStyle);
}
oStyleAppend('.example {height: 100px;}');
jquery
$('<style>').text('.example {height: 100px;}').appendTo(document.head);
[…]
Parsedown: image size dimension attribute
2020-01-01
This class BParsedown
as an extension for "Parsedown" reads optional image size dimensions like =50x50
in markdown syntax and builds a proper image tag with width
and height
attributes from it. It supports inline syntax as well as markdown per reference.
✔ pos. tested with Parsedown Release: 1.7.4.
Examples
Inline
m […]