mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Add local editor classes and styles to inline styling in resulting HTML
1/2 - needs more improvements and optimizations - although it works already
This commit is contained in:
6
unauthenticated/js/computed-style-to-inline-style.min.js
vendored
Normal file
6
unauthenticated/js/computed-style-to-inline-style.min.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
computed-style-to-inline-style v3.0.0 (https://github.com/lukehorvat/computed-style-to-inline-style)
|
||||
Copyright (c) 2016 Luke Horvat
|
||||
Licensed under MIT (https://github.com/lukehorvat/computed-style-to-inline-style/blob/master/LICENSE)
|
||||
*/
|
||||
!function(e,t){if("function"==typeof define&&define.amd)define(["module"],t);else if("undefined"!=typeof exports)t(module);else{var o={exports:{}};t(o),e.computedStyleToInlineStyle=o.exports}}(this,(function(e){var t=Array.prototype.forEach;e.exports=function e(o){var r,i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!o)throw new Error("No element specified.");n.recursive&&(i=o.children,t).call(i,(function(t){e(t,n)}));var l=getComputedStyle(o);(r=n.properties||l,t).call(r,(function(e){o.style[e]=l.getPropertyValue(e),o.removeAttribute("class"),o.removeAttribute("id")}))}}));
|
||||
Reference in New Issue
Block a user