From 4a7ffe9da9e130d5061ddcc490541bf7305a6997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Sun, 15 Jan 2017 13:04:31 +0100 Subject: [PATCH] Moved CKEDITOR_BASEPATH into openslides-libs.js (Fixed #2787) --- gulpfile.js | 3 +++ openslides/core/static/templates/index.html | 5 +---- package.json | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 95a75a017..fcb4c9e17 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -22,6 +22,7 @@ var argv = require('yargs').argv, cssnano = require('gulp-cssnano'), gulpif = require('gulp-if'), gettext = require('gulp-angular-gettext'), + inject = require('gulp-inject-string'), jshint = require('gulp-jshint'), mainBowerFiles = require('main-bower-files'), path = require('path'), @@ -61,6 +62,8 @@ gulp.task('js-libs', function () { .pipe(sourcemaps.init()) .pipe(concat('openslides-libs.js')) .pipe(sourcemaps.write()) + .pipe(inject.prepend("/* set basepath of CKEditor */\n" + + "window.CKEDITOR_BASEPATH = '/static/ckeditor/';\n\n")) .pipe(gulpif(argv.production, uglify())) .pipe(gulp.dest(path.join(output_directory, 'js'))); }); diff --git a/openslides/core/static/templates/index.html b/openslides/core/static/templates/index.html index b2318cec7..f416b51be 100644 --- a/openslides/core/static/templates/index.html +++ b/openslides/core/static/templates/index.html @@ -10,10 +10,7 @@ - - + diff --git a/package.json b/package.json index 0d9bae264..1bcc82d1e 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "gulp-concat": "~2.6.0", "gulp-cssnano": "~2.1.0", "gulp-if": "~2.0.0", + "gulp-inject-string": "~1.1.0", "gulp-jshint": "~2.0.0", "gulp-rename": "~1.2.2", "gulp-sourcemaps": "~1.6.0",