(css) Improve display of HTML CKEditor

This commit is contained in:
Francis Lachapelle
2017-01-19 14:47:11 -05:00
parent d7d88e2620
commit db1cc24c20
4 changed files with 17 additions and 37 deletions
+10 -1
View File
@@ -40,7 +40,7 @@
},
link: function($scope, elm, attr, ngModel) {
var ck, options = {}, locale;
var ck, options = {}, locale, margin;
if (!ngModel) {
return;
}
@@ -59,11 +59,20 @@
options.scayt_sLang = locale;
}
if (attr.ckMargin) {
// Set the margin of the iframe editable content
margin = attr.ckMargin;
CKEDITOR.addCss('.cke_editable { margin-top: ' + margin +
'; margin-left: ' + margin +
'; margin-right: ' + margin + '; }');
}
// The Upload Image plugin requires a remote URL to be defined even though we won't use it
options.imageUploadUrl = '/SOGo/';
ck = CKEDITOR.replace(elm[0], options);
// Update the model whenever the content changes
ck.on('change', function() {
$scope.$apply(function() {