mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 22:23:33 +01:00
aceEditorCSS to allow absolute paths to resources to include external CSS
This commit is contained in:
parent
8a79ae6e02
commit
ad2ea924b5
1 changed files with 12 additions and 2 deletions
|
@ -229,7 +229,12 @@ function Ace2Editor()
|
|||
$$INCLUDE_CSS("../static/css/pad.css");
|
||||
$$INCLUDE_CSS("../static/custom/pad.css");
|
||||
|
||||
var additionalCSS = _(hooks.callAll("aceEditorCSS")).map(function(path){ return '../static/plugins/' + path });
|
||||
var additionalCSS = _(hooks.callAll("aceEditorCSS")).map(function(path){
|
||||
if (path.match(/\/\//)) { // Allow urls to external CSS - http(s):// and //some/path.css
|
||||
return path;
|
||||
}
|
||||
return '../static/plugins/' + path;
|
||||
});
|
||||
includedCSS = includedCSS.concat(additionalCSS);
|
||||
|
||||
pushStyleTagsFor(iframeHTML, includedCSS);
|
||||
|
@ -308,7 +313,12 @@ window.onload = function () {\n\
|
|||
$$INCLUDE_CSS("../static/custom/pad.css");
|
||||
|
||||
|
||||
var additionalCSS = _(hooks.callAll("aceEditorCSS")).map(function(path){ return '../static/plugins/' + path });
|
||||
var additionalCSS = _(hooks.callAll("aceEditorCSS")).map(function(path){
|
||||
if (path.match(/\/\//)) { // Allow urls to external CSS - http(s):// and //some/path.css
|
||||
return path;
|
||||
}
|
||||
return '../static/plugins/' + path }
|
||||
);
|
||||
includedCSS = includedCSS.concat(additionalCSS);
|
||||
|
||||
pushStyleTagsFor(outerHTML, includedCSS);
|
||||
|
|
Loading…
Reference in a new issue