JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: improve wysiwyg html editor toolbars
authorJason Woofenden <jason@jasonwoof.com>
Tue, 20 Sep 2011 03:37:25 +0000 (23:37 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Tue, 20 Sep 2011 03:37:25 +0000 (23:37 -0400)
metaform/template.html

index d60f62e..9be9359 100644 (file)
@@ -4,17 +4,35 @@
 <head>
        <meta charset="utf-8" />
        <title><!--~~$title show {~~-->~plural cap~<!--~~}~~--></title>
-       <link rel="stylesheet" href="style.css" type="text/css"><!--~html_editor_headers {~--><!--~~$head {~~-->
+       <link rel="stylesheet" href="style.css" type="text/css"><!--~html_editor_headers {~-->
+       <!--~~$head {~~-->
        <script type="text/javascript" src="code/ckeditor/ckeditor.js"></script>
        <script language="javascript" type="text/javascript">
                function make_wysiwyg(name) {
                        CKEDITOR.replace(name, {
+                               'contentsCss': 'style.css',
                                'uiColor': '#ccccff',
                                'removePlugins': 'forms,templates,smiley,pagebreak,save,newpage,preview,print',
-                               'height': '300px'
+                               'height': '300px',
+                               'toolbar': [
+                                       ['Source'],
+                                       ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'SpellChecker', 'Scayt'],
+                                       ['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
+                                       '/',
+                                       ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript'],
+                                       ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'],
+                                       ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+                                       ['Link', 'Unlink', 'Anchor'],
+                                       ['Image', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak'],
+                                       '/',
+                                       ['Styles', 'Format', 'Font', 'FontSize'],
+                                       ['TextColor', 'BGColor'],
+                                       ['Maximize', 'ShowBlocks']
+                               ]
                        });
                }
-       </script><!--~~}~~--><!--~}~-->
+       </script>
+       <!--~~}~~--><!--~}~-->
 </head>
 
 <body>