From dc8f9402d07092096532943cad092630dd550992 Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 12 Jul 2011 20:24:39 +0530 Subject: [PATCH] editor css --- edgware/static/ckeditor/config.js | 2 +- edgware/static/css/customck.css | 12 ++++++++++++ edgware/static/js/editor.js | 8 +++++--- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 edgware/static/css/customck.css diff --git a/edgware/static/ckeditor/config.js b/edgware/static/ckeditor/config.js index c1e2168..304dbdb 100755 --- a/edgware/static/ckeditor/config.js +++ b/edgware/static/ckeditor/config.js @@ -15,7 +15,7 @@ CKEDITOR.editorConfig = function( config ) [ ]; - config.contentsCss = '/static/css/fonts.css'; + config.contentsCss = ['/static/css/fonts.css', '/static/css/customck.css']; config.font_names = "Edgware Road;Berlin Safari;SG Grotesque;Tallys;GraublauWeb;Fontin;Tagesschrift;Neeon;"; diff --git a/edgware/static/css/customck.css b/edgware/static/css/customck.css new file mode 100644 index 0000000..5334342 --- /dev/null +++ b/edgware/static/css/customck.css @@ -0,0 +1,12 @@ +body, html { + padding: 0; + margin: 0; + font-size: 12px; + font-family: Helvetica, sans-serif; +} + +p, p * { + margin-top: 0px; +} + + diff --git a/edgware/static/js/editor.js b/edgware/static/js/editor.js index 34b7eed..f2d937d 100644 --- a/edgware/static/js/editor.js +++ b/edgware/static/js/editor.js @@ -1286,13 +1286,14 @@ function replaceDiv( div ) { // console.log(div); // alert($(div).attr('classname')); - height = parseInt($(div).css('height')) - 6; + height = parseInt($(div).css('height')); height = toPx(height); - width = parseInt($(div).css('width')) - 6; + width = parseInt($(div).css('width')); width = toPx(width); editor = CKEDITOR.replace( div, { + width: width, height: height, toolbar : 'Basic', uiColor : '#9AB8F3', @@ -1626,7 +1627,8 @@ $(".box").live("click", function(e){ box = boxObj.jq; if (box.css("direction") == 'rtl') { setTimeout(function() { $($('iframe').get(0).contentDocument).find('html').attr("dir", "rtl") }, 500); - } + } + $('iframe').attr("allowtransparency", "false"); box.draggable('disable'); box.resizable('disable'); text_edit_mode = true;