mirror of https://github.com/xwiki-labs/cryptpad
removing `bower`: migrate `ckeditor`
Signed-off-by: Pamplemousse <git@xaviermaso.com>
This commit is contained in:
parent
325154e956
commit
f012d692de
|
@ -19,7 +19,6 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"components-font-awesome": "^4.6.3",
|
||||
"ckeditor": "4.14.0",
|
||||
"codemirror": "^5.19.0",
|
||||
"requirejs": "2.3.5",
|
||||
"marked": "1.1.0",
|
||||
|
|
|
@ -62,7 +62,7 @@ CKEDITOR.editorConfig = function( config ) {
|
|||
// every part of ckeditor will get in the browser cache.
|
||||
var fix = function (x) {
|
||||
if (x.map) { return x.map(fix); }
|
||||
return (/\/bower_components\/.*\.css$/.test(x)) ? (x + '?ver=' + CKEDITOR.timestamp) : x;
|
||||
return (/\/components\/.*\.css$/.test(x)) ? (x + '?ver=' + CKEDITOR.timestamp) : x;
|
||||
};
|
||||
CKEDITOR.tools._buildStyleHtml = CKEDITOR.tools.buildStyleHtml;
|
||||
CKEDITOR.document._appendStyleSheet = CKEDITOR.document.appendStyleSheet;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
"ws": "^3.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ckeditor": "^4.12.1",
|
||||
"jquery": "3.6.0",
|
||||
"jshint": "^2.13.4",
|
||||
"less": "3.7.1",
|
||||
|
@ -873,6 +874,13 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ckeditor": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/ckeditor/-/ckeditor-4.12.1.tgz",
|
||||
"integrity": "sha512-pH2Su4oi0D4iN/3U8nUcwI7/lXHoOJi0aiN8e2zxnm4Ow5kq8eZP2ZGmpYyuqRyKZ2tHaU8+OyYi7laXcjiq9Q==",
|
||||
"deprecated": "We have renamed the @ckeditor package. New versions are available under the @ckeditor4 name.",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/class-utils": {
|
||||
"version": "0.3.6",
|
||||
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
|
||||
|
@ -5376,6 +5384,12 @@
|
|||
"strip-color": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"ckeditor": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/ckeditor/-/ckeditor-4.12.1.tgz",
|
||||
"integrity": "sha512-pH2Su4oi0D4iN/3U8nUcwI7/lXHoOJi0aiN8e2zxnm4Ow5kq8eZP2ZGmpYyuqRyKZ2tHaU8+OyYi7laXcjiq9Q==",
|
||||
"dev": true
|
||||
},
|
||||
"class-utils": {
|
||||
"version": "0.3.6",
|
||||
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
"ws": "^3.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ckeditor": "^4.12.1",
|
||||
"jquery": "3.6.0",
|
||||
"jshint": "^2.13.4",
|
||||
"less": "3.7.1",
|
||||
|
|
|
@ -8,6 +8,7 @@ Fse.mkdirpSync(componentsPath);
|
|||
[
|
||||
"jquery",
|
||||
"tweetnacl",
|
||||
"ckeditor",
|
||||
].forEach(l => {
|
||||
const source = Path.join("node_modules", l);
|
||||
const destination = Path.join(componentsPath, l);
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<!DOCTYPE html>
|
||||
<html dir="ltr" lang="en"><head><title>Rich Text Editor, editor1</title><style data-cke-temp="1">html{cursor:text;*cursor:auto}
|
||||
img,input,textarea{cursor:default}</style><link type="text/css" rel="stylesheet" href="/bower_components/ckeditor/plugins/tableselection/styles/tableselection.css"></head><body><p><br></p></body></html>
|
||||
img,input,textarea{cursor:default}</style><link type="text/css" rel="stylesheet" href="/components/ckeditor/plugins/tableselection/styles/tableselection.css"></head><body><p><br></p></body></html>
|
||||
|
|
|
@ -2,7 +2,7 @@ require(['/api/config'], function(ApiConfig) {
|
|||
// see ckeditor_base.js getUrl()
|
||||
window.CKEDITOR_GETURL = function(resource) {
|
||||
if (resource.indexOf('/') === 0) {
|
||||
resource = window.CKEDITOR.basePath.replace(/\/bower_components\/.*/, '') + resource;
|
||||
resource = window.CKEDITOR.basePath.replace(/\/components\/.*/, '') + resource;
|
||||
} else if (resource.indexOf(':/') === -1) {
|
||||
resource = window.CKEDITOR.basePath + resource;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ require(['/api/config'], function(ApiConfig) {
|
|||
}
|
||||
};
|
||||
|
||||
require(['/bower_components/ckeditor/ckeditor.js']);
|
||||
require(['/components/ckeditor/ckeditor.js']);
|
||||
});
|
||||
define([
|
||||
'jquery',
|
||||
|
@ -1405,7 +1405,7 @@ define([
|
|||
var _getPath = Ckeditor.plugins.getPath;
|
||||
Ckeditor.plugins.getPath = function (name) {
|
||||
if (name === 'preview') {
|
||||
return window.location.origin + "/bower_components/ckeditor/plugins/preview/";
|
||||
return window.location.origin + "/components/ckeditor/plugins/preview/";
|
||||
}
|
||||
return _getPath(name);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue