From c39d18085fe2ad0fe8db04ba77773a2b9595c643 Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Fri, 16 Nov 2012 13:37:44 +0100 Subject: [PATCH 01/13] Updated replacebycode sample contents. * Updated default contents CSS. --- contents.css | 30 ++++++++++-- samples/replacebycode.html | 94 ++++++++++++++++++++++---------------- 2 files changed, 82 insertions(+), 42 deletions(-) diff --git a/contents.css b/contents.css index 9e5b21d5bbb..f7d430e726f 100644 --- a/contents.css +++ b/contents.css @@ -6,14 +6,28 @@ For licensing, see LICENSE.html or http://ckeditor.com/license body { /* Font */ - font-family: Arial, Verdana, sans-serif; - font-size: 12px; + font-family: sans-serif, Arial, Verdana, "Trebuchet MS"; + font-size: 13px; /* Text color */ - color: #222; + color: #333; /* Remove the background color to make it transparent */ background-color: #fff; + + margin: 20px; +} + +blockquote +{ + font-style: italic; + padding: 8px 8px 8px 20px; + border-left: 5px solid #ccc; +} + +a +{ + color: #0782C1; } ol,ul,dl @@ -23,3 +37,13 @@ ol,ul,dl /* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/ padding:0 40px; } + +h1,h2,h3,h4,h5,h6 +{ + font-weight: normal; +} + +p,ul,ol,dl,blockquote +{ + line-height: 1.6em; +} \ No newline at end of file diff --git a/samples/replacebycode.html b/samples/replacebycode.html index d64962ee650..5376c0d923c 100644 --- a/samples/replacebycode.html +++ b/samples/replacebycode.html @@ -24,45 +24,61 @@

diff --git a/styles.js b/styles.js index 1eea09e4fed..41d16fa79fe 100644 --- a/styles.js +++ b/styles.js @@ -31,8 +31,18 @@ CKEDITOR.stylesSet.add( 'default', [ { name: 'Address', element: 'address' }, */ - { name: 'Blue Title', element: 'h3', styles: { 'color': 'Blue' } }, - { name: 'Red Title', element: 'h3', styles: { 'color': 'Red' } }, + { name: 'Italic Title', element: 'h2', styles: { 'font-style': 'italic' } }, + { name: 'Subtitle', element: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } }, + { + name: 'Block container', + element: 'div', + styles: { + padding: '10px', + background: '#eee', + border: '1px solid #ccc', + 'margin-bottom': '10px' + } + }, /* Inline Styles */ @@ -72,22 +82,42 @@ CKEDITOR.stylesSet.add( 'default', [ /* Object Styles */ { - name: 'Image on Left', + name: 'Styled image (left)', element: 'img', attributes: { - 'style': 'padding: 5px; margin-right: 5px', - 'border': '2', 'align': 'left' + }, + styles: { + padding: '5px', + 'margin-right': '10px', + border: '1px solid #ccc' } }, { - name: 'Image on Right', + name: 'Styled image (right)', element: 'img', attributes: { - 'style': 'padding: 5px; margin-left: 5px', - 'border': '2', 'align': 'right' + }, + styles: { + padding: '5px', + 'margin-left': '10px', + border: '1px solid #ccc' + } + }, + + { + name: 'Compact table', + element: 'table', + attributes: { + cellpadding: '5', + cellspacing: '0', + border: '1', + bordercolor: '#ccc' + }, + styles: { + 'border-collapse': 'collapse' } }, From b77aa236d4d60571e28d6c6c279142d5431f072b Mon Sep 17 00:00:00 2001 From: fredck Date: Fri, 16 Nov 2012 20:05:28 +0100 Subject: [PATCH 04/13] Using classes for the image styles to avoid color issues. --- contents.css | 14 ++++++++++++++ samples/replacebycode.html | 2 +- styles.js | 18 ++---------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/contents.css b/contents.css index 7ddf91101b8..e0c66497d4f 100644 --- a/contents.css +++ b/contents.css @@ -56,6 +56,20 @@ hr border-top: 1px solid #ccc; } +img.right { + border: 1px solid #ccc; + float: right; + margin-left: 15px; + padding: 5px; +} + +img.left { + border: 1px solid #ccc; + float: right; + margin-left: 15px; + padding: 5px; +} + img:hover { opacity: .9; filter: alpha(opacity = 90); diff --git a/samples/replacebycode.html b/samples/replacebycode.html index 8c0b95c882e..dde6f4f3448 100644 --- a/samples/replacebycode.html +++ b/samples/replacebycode.html @@ -24,7 +24,7 @@

diff --git a/samples/replacebycode.html b/samples/replacebycode.html index 4d0b99ab2b8..3244ccc21ea 100644 --- a/samples/replacebycode.html +++ b/samples/replacebycode.html @@ -24,60 +24,7 @@