Added margins to floated images and updated editor controls. Fixes #18.
Showing
2 changed files
with
22 additions
and
1 deletions
| ... | @@ -15,7 +15,7 @@ module.exports = { | ... | @@ -15,7 +15,7 @@ module.exports = { |
| 15 | automatic_uploads: false, | 15 | automatic_uploads: false, |
| 16 | valid_children: "-div[p|pre|h1|h2|h3|h4|h5|h6|blockquote]", | 16 | valid_children: "-div[p|pre|h1|h2|h3|h4|h5|h6|blockquote]", |
| 17 | plugins: "image table textcolor paste link imagetools fullscreen code hr", | 17 | plugins: "image table textcolor paste link imagetools fullscreen code hr", |
| 18 | - toolbar: "undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image link hr | code fullscreen", | 18 | + toolbar: "undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image link hr | removeformat code fullscreen", |
| 19 | content_style: "body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}", | 19 | content_style: "body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}", |
| 20 | style_formats: [ | 20 | style_formats: [ |
| 21 | {title: "Header 1", format: "h1"}, | 21 | {title: "Header 1", format: "h1"}, |
| ... | @@ -27,6 +27,11 @@ module.exports = { | ... | @@ -27,6 +27,11 @@ module.exports = { |
| 27 | {title: "Code Block", icon: "code", format: "pre"}, | 27 | {title: "Code Block", icon: "code", format: "pre"}, |
| 28 | {title: "Inline Code", icon: "code", inline: "code"} | 28 | {title: "Inline Code", icon: "code", inline: "code"} |
| 29 | ], | 29 | ], |
| 30 | + formats : { | ||
| 31 | + alignleft : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'align-left'}, | ||
| 32 | + aligncenter : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'align-center'}, | ||
| 33 | + alignright : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'align-right'}, | ||
| 34 | + }, | ||
| 30 | file_browser_callback: function(field_name, url, type, win) { | 35 | file_browser_callback: function(field_name, url, type, win) { |
| 31 | ImageManager.show(function(image) { | 36 | ImageManager.show(function(image) { |
| 32 | win.document.getElementById(field_name).value = image.url; | 37 | win.document.getElementById(field_name).value = image.url; | ... | ... |
| ... | @@ -17,10 +17,26 @@ | ... | @@ -17,10 +17,26 @@ |
| 17 | 17 | ||
| 18 | .page-content { | 18 | .page-content { |
| 19 | max-width: 840px; | 19 | max-width: 840px; |
| 20 | + .align-left { | ||
| 21 | + float: left !important; | ||
| 22 | + text-align: left; | ||
| 23 | + margin: $-xs $-s $-xs 0; | ||
| 24 | + } | ||
| 25 | + .align-right { | ||
| 26 | + float: right !important; | ||
| 27 | + text-align: right; | ||
| 28 | + margin: $-xs 0 $-xs $-s; | ||
| 29 | + } | ||
| 30 | + .align-center { | ||
| 31 | + text-align: center; | ||
| 32 | + } | ||
| 20 | img { | 33 | img { |
| 21 | max-width: 100%; | 34 | max-width: 100%; |
| 22 | height:auto; | 35 | height:auto; |
| 23 | } | 36 | } |
| 37 | + h1, h2, h3, h4, h5, h6 { | ||
| 38 | + clear: both; | ||
| 39 | + } | ||
| 24 | } | 40 | } |
| 25 | 41 | ||
| 26 | // Page content pointers | 42 | // Page content pointers | ... | ... |
-
Please register or sign in to post a comment