From c8b8caad598118f3a5441a3c48b6d207061efc88 Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Fri, 16 Nov 2012 15:45:30 +0100 Subject: [PATCH] Improved content styles. Updated replacebycode sample contents. * Added block container style. * Added compact table style for content. * Updated image styles. --- contents.css | 17 ++++++++++++-- samples/replacebycode.html | 12 +++++----- styles.js | 46 +++++++++++++++++++++++++++++++------- 3 files changed, 59 insertions(+), 16 deletions(-) diff --git a/contents.css b/contents.css index f7d430e726..7ddf91101b 100644 --- a/contents.css +++ b/contents.css @@ -16,13 +16,15 @@ body background-color: #fff; margin: 20px; + line-height: 1.6em; } blockquote { font-style: italic; - padding: 8px 8px 8px 20px; + padding: 2px 8px 2px 20px; border-left: 5px solid #ccc; + font-family: Georgia, Times, "Times New Roman", serif; } a @@ -41,9 +43,20 @@ ol,ul,dl h1,h2,h3,h4,h5,h6 { font-weight: normal; + line-height: 1.2em; } p,ul,ol,dl,blockquote { - line-height: 1.6em; +} + +hr +{ + border: 0px; + border-top: 1px solid #ccc; +} + +img:hover { + opacity: .9; + filter: alpha(opacity = 90); } \ No newline at end of file diff --git a/samples/replacebycode.html b/samples/replacebycode.html index 5376c0d923..8c0b95c882 100644 --- a/samples/replacebycode.html +++ b/samples/replacebycode.html @@ -24,10 +24,7 @@

diff --git a/styles.js b/styles.js index 1eea09e4fe..41d16fa79f 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' } },