diff options
| author | hukl <contact@smyck.org> | 2009-02-17 21:54:39 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-17 21:54:39 +0100 |
| commit | f61b5b0597e0c25f084ee67d402f12a43a7a9947 (patch) | |
| tree | 3b4c3f9f38637f1a7ecf703ece4fd3bc4c6e2934 /public/javascripts/tiny_mce/themes/simple | |
| parent | 3d3b786cc43266f6292f5edd25733dbb9bd6ed06 (diff) | |
added tinymce editor for body area of pages
Diffstat (limited to 'public/javascripts/tiny_mce/themes/simple')
| -rwxr-xr-x | public/javascripts/tiny_mce/themes/simple/editor_template.js | 1 | ||||
| -rwxr-xr-x | public/javascripts/tiny_mce/themes/simple/editor_template_src.js | 85 | ||||
| -rwxr-xr-x | public/javascripts/tiny_mce/themes/simple/img/icons.gif | bin | 0 -> 1440 bytes | |||
| -rwxr-xr-x | public/javascripts/tiny_mce/themes/simple/langs/en.js | 11 | ||||
| -rwxr-xr-x | public/javascripts/tiny_mce/themes/simple/skins/default/content.css | 25 | ||||
| -rwxr-xr-x | public/javascripts/tiny_mce/themes/simple/skins/default/ui.css | 32 | ||||
| -rwxr-xr-x | public/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css | 17 | ||||
| -rwxr-xr-x | public/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png | bin | 0 -> 5102 bytes | |||
| -rwxr-xr-x | public/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css | 35 |
9 files changed, 206 insertions, 0 deletions
diff --git a/public/javascripts/tiny_mce/themes/simple/editor_template.js b/public/javascripts/tiny_mce/themes/simple/editor_template.js new file mode 100755 index 0000000..d19fb53 --- /dev/null +++ b/public/javascripts/tiny_mce/themes/simple/editor_template.js | |||
| @@ -0,0 +1 @@ | |||
| (function(){var DOM=tinymce.DOM;tinymce.ThemeManager.requireLangPack('simple');tinymce.create('tinymce.themes.SimpleTheme',{init:function(ed,url){var t=this,states=['Bold','Italic','Underline','Strikethrough','InsertUnorderedList','InsertOrderedList'],s=ed.settings;t.editor=ed;ed.onInit.add(function(){ed.onNodeChange.add(function(ed,cm){tinymce.each(states,function(c){cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c));});});ed.dom.loadCSS(url+"/skins/"+s.skin+"/content.css");});DOM.loadCSS((s.editor_css?ed.documentBaseURI.toAbsolute(s.editor_css):'')||url+"/skins/"+s.skin+"/ui.css");},renderUI:function(o){var t=this,n=o.targetNode,ic,tb,ed=t.editor,cf=ed.controlManager,sc;n=DOM.insertAfter(DOM.create('span',{id:ed.id+'_container','class':'mceEditor '+ed.settings.skin+'SimpleSkin'}),n);n=sc=DOM.add(n,'table',{cellPadding:0,cellSpacing:0,'class':'mceLayout'});n=tb=DOM.add(n,'tbody');n=DOM.add(tb,'tr');n=ic=DOM.add(DOM.add(n,'td'),'div',{'class':'mceIframeContainer'});n=DOM.add(DOM.add(tb,'tr',{'class':'last'}),'td',{'class':'mceToolbar mceLast',align:'center'});tb=t.toolbar=cf.createToolbar("tools1");tb.add(cf.createButton('bold',{title:'simple.bold_desc',cmd:'Bold'}));tb.add(cf.createButton('italic',{title:'simple.italic_desc',cmd:'Italic'}));tb.add(cf.createButton('underline',{title:'simple.underline_desc',cmd:'Underline'}));tb.add(cf.createButton('strikethrough',{title:'simple.striketrough_desc',cmd:'Strikethrough'}));tb.add(cf.createSeparator());tb.add(cf.createButton('undo',{title:'simple.undo_desc',cmd:'Undo'}));tb.add(cf.createButton('redo',{title:'simple.redo_desc',cmd:'Redo'}));tb.add(cf.createSeparator());tb.add(cf.createButton('cleanup',{title:'simple.cleanup_desc',cmd:'mceCleanup'}));tb.add(cf.createSeparator());tb.add(cf.createButton('insertunorderedlist',{title:'simple.bullist_desc',cmd:'InsertUnorderedList'}));tb.add(cf.createButton('insertorderedlist',{title:'simple.numlist_desc',cmd:'InsertOrderedList'}));tb.renderTo(n);return{iframeContainer:ic,editorContainer:ed.id+'_container',sizeContainer:sc,deltaHeight:-20};},getInfo:function(){return{longname:'Simple theme',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add('simple',tinymce.themes.SimpleTheme);})(); \ No newline at end of file | |||
diff --git a/public/javascripts/tiny_mce/themes/simple/editor_template_src.js b/public/javascripts/tiny_mce/themes/simple/editor_template_src.js new file mode 100755 index 0000000..fb0bd78 --- /dev/null +++ b/public/javascripts/tiny_mce/themes/simple/editor_template_src.js | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_template_src.js 920 2008-09-09 14:05:33Z spocke $ | ||
| 3 | * | ||
| 4 | * This file is meant to showcase how to create a simple theme. The advanced | ||
| 5 | * theme is more suitable for production use. | ||
| 6 | * | ||
| 7 | * @author Moxiecode | ||
| 8 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 9 | */ | ||
| 10 | |||
| 11 | (function() { | ||
| 12 | var DOM = tinymce.DOM; | ||
| 13 | |||
| 14 | // Tell it to load theme specific language pack(s) | ||
| 15 | tinymce.ThemeManager.requireLangPack('simple'); | ||
| 16 | |||
| 17 | tinymce.create('tinymce.themes.SimpleTheme', { | ||
| 18 | init : function(ed, url) { | ||
| 19 | var t = this, states = ['Bold', 'Italic', 'Underline', 'Strikethrough', 'InsertUnorderedList', 'InsertOrderedList'], s = ed.settings; | ||
| 20 | |||
| 21 | t.editor = ed; | ||
| 22 | |||
| 23 | ed.onInit.add(function() { | ||
| 24 | ed.onNodeChange.add(function(ed, cm) { | ||
| 25 | tinymce.each(states, function(c) { | ||
| 26 | cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c)); | ||
| 27 | }); | ||
| 28 | }); | ||
| 29 | |||
| 30 | ed.dom.loadCSS(url + "/skins/" + s.skin + "/content.css"); | ||
| 31 | }); | ||
| 32 | |||
| 33 | DOM.loadCSS((s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : '') || url + "/skins/" + s.skin + "/ui.css"); | ||
| 34 | }, | ||
| 35 | |||
| 36 | renderUI : function(o) { | ||
| 37 | var t = this, n = o.targetNode, ic, tb, ed = t.editor, cf = ed.controlManager, sc; | ||
| 38 | |||
| 39 | n = DOM.insertAfter(DOM.create('span', {id : ed.id + '_container', 'class' : 'mceEditor ' + ed.settings.skin + 'SimpleSkin'}), n); | ||
| 40 | n = sc = DOM.add(n, 'table', {cellPadding : 0, cellSpacing : 0, 'class' : 'mceLayout'}); | ||
| 41 | n = tb = DOM.add(n, 'tbody'); | ||
| 42 | |||
| 43 | // Create iframe container | ||
| 44 | n = DOM.add(tb, 'tr'); | ||
| 45 | n = ic = DOM.add(DOM.add(n, 'td'), 'div', {'class' : 'mceIframeContainer'}); | ||
| 46 | |||
| 47 | // Create toolbar container | ||
| 48 | n = DOM.add(DOM.add(tb, 'tr', {'class' : 'last'}), 'td', {'class' : 'mceToolbar mceLast', align : 'center'}); | ||
| 49 | |||
| 50 | // Create toolbar | ||
| 51 | tb = t.toolbar = cf.createToolbar("tools1"); | ||
| 52 | tb.add(cf.createButton('bold', {title : 'simple.bold_desc', cmd : 'Bold'})); | ||
| 53 | tb.add(cf.createButton('italic', {title : 'simple.italic_desc', cmd : 'Italic'})); | ||
| 54 | tb.add(cf.createButton('underline', {title : 'simple.underline_desc', cmd : 'Underline'})); | ||
| 55 | tb.add(cf.createButton('strikethrough', {title : 'simple.striketrough_desc', cmd : 'Strikethrough'})); | ||
| 56 | tb.add(cf.createSeparator()); | ||
| 57 | tb.add(cf.createButton('undo', {title : 'simple.undo_desc', cmd : 'Undo'})); | ||
| 58 | tb.add(cf.createButton('redo', {title : 'simple.redo_desc', cmd : 'Redo'})); | ||
| 59 | tb.add(cf.createSeparator()); | ||
| 60 | tb.add(cf.createButton('cleanup', {title : 'simple.cleanup_desc', cmd : 'mceCleanup'})); | ||
| 61 | tb.add(cf.createSeparator()); | ||
| 62 | tb.add(cf.createButton('insertunorderedlist', {title : 'simple.bullist_desc', cmd : 'InsertUnorderedList'})); | ||
| 63 | tb.add(cf.createButton('insertorderedlist', {title : 'simple.numlist_desc', cmd : 'InsertOrderedList'})); | ||
| 64 | tb.renderTo(n); | ||
| 65 | |||
| 66 | return { | ||
| 67 | iframeContainer : ic, | ||
| 68 | editorContainer : ed.id + '_container', | ||
| 69 | sizeContainer : sc, | ||
| 70 | deltaHeight : -20 | ||
| 71 | }; | ||
| 72 | }, | ||
| 73 | |||
| 74 | getInfo : function() { | ||
| 75 | return { | ||
| 76 | longname : 'Simple theme', | ||
| 77 | author : 'Moxiecode Systems AB', | ||
| 78 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 79 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 80 | } | ||
| 81 | } | ||
| 82 | }); | ||
| 83 | |||
| 84 | tinymce.ThemeManager.add('simple', tinymce.themes.SimpleTheme); | ||
| 85 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/themes/simple/img/icons.gif b/public/javascripts/tiny_mce/themes/simple/img/icons.gif new file mode 100755 index 0000000..16af141 --- /dev/null +++ b/public/javascripts/tiny_mce/themes/simple/img/icons.gif | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/themes/simple/langs/en.js b/public/javascripts/tiny_mce/themes/simple/langs/en.js new file mode 100755 index 0000000..9f08f10 --- /dev/null +++ b/public/javascripts/tiny_mce/themes/simple/langs/en.js | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | tinyMCE.addI18n('en.simple',{ | ||
| 2 | bold_desc:"Bold (Ctrl+B)", | ||
| 3 | italic_desc:"Italic (Ctrl+I)", | ||
| 4 | underline_desc:"Underline (Ctrl+U)", | ||
| 5 | striketrough_desc:"Strikethrough", | ||
| 6 | bullist_desc:"Unordered list", | ||
| 7 | numlist_desc:"Ordered list", | ||
| 8 | undo_desc:"Undo (Ctrl+Z)", | ||
| 9 | redo_desc:"Redo (Ctrl+Y)", | ||
| 10 | cleanup_desc:"Cleanup messy code" | ||
| 11 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/themes/simple/skins/default/content.css b/public/javascripts/tiny_mce/themes/simple/skins/default/content.css new file mode 100755 index 0000000..2506c80 --- /dev/null +++ b/public/javascripts/tiny_mce/themes/simple/skins/default/content.css | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | body, td, pre { | ||
| 2 | font-family: Verdana, Arial, Helvetica, sans-serif; | ||
| 3 | font-size: 10px; | ||
| 4 | } | ||
| 5 | |||
| 6 | body { | ||
| 7 | background-color: #FFFFFF; | ||
| 8 | } | ||
| 9 | |||
| 10 | .mceVisualAid { | ||
| 11 | border: 1px dashed #BBBBBB; | ||
| 12 | } | ||
| 13 | |||
| 14 | /* MSIE specific */ | ||
| 15 | |||
| 16 | * html body { | ||
| 17 | scrollbar-3dlight-color: #F0F0EE; | ||
| 18 | scrollbar-arrow-color: #676662; | ||
| 19 | scrollbar-base-color: #F0F0EE; | ||
| 20 | scrollbar-darkshadow-color: #DDDDDD; | ||
| 21 | scrollbar-face-color: #E0E0DD; | ||
| 22 | scrollbar-highlight-color: #F0F0EE; | ||
| 23 | scrollbar-shadow-color: #F0F0EE; | ||
| 24 | scrollbar-track-color: #F5F5F5; | ||
| 25 | } | ||
diff --git a/public/javascripts/tiny_mce/themes/simple/skins/default/ui.css b/public/javascripts/tiny_mce/themes/simple/skins/default/ui.css new file mode 100755 index 0000000..076fe84 --- /dev/null +++ b/public/javascripts/tiny_mce/themes/simple/skins/default/ui.css | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* Reset */ | ||
| 2 | .defaultSimpleSkin table, .defaultSimpleSkin tbody, .defaultSimpleSkin a, .defaultSimpleSkin img, .defaultSimpleSkin tr, .defaultSimpleSkin div, .defaultSimpleSkin td, .defaultSimpleSkin iframe, .defaultSimpleSkin span, .defaultSimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000} | ||
| 3 | |||
| 4 | /* Containers */ | ||
| 5 | .defaultSimpleSkin {position:relative} | ||
| 6 | .defaultSimpleSkin table.mceLayout {background:#F0F0EE; border:1px solid #CCC;} | ||
| 7 | .defaultSimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #CCC;} | ||
| 8 | .defaultSimpleSkin .mceToolbar {height:24px;} | ||
| 9 | |||
| 10 | /* Layout */ | ||
| 11 | .defaultSimpleSkin span.mceIcon, .defaultSimpleSkin img.mceIcon {display:block; width:20px; height:20px} | ||
| 12 | .defaultSimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} | ||
| 13 | |||
| 14 | /* Button */ | ||
| 15 | .defaultSimpleSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px} | ||
| 16 | .defaultSimpleSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} | ||
| 17 | .defaultSimpleSkin a.mceButtonActive {border:1px solid #0A246A; background-color:#C2CBE0} | ||
| 18 | .defaultSimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} | ||
| 19 | |||
| 20 | /* Separator */ | ||
| 21 | .defaultSimpleSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:0 2px 0 4px} | ||
| 22 | |||
| 23 | /* Theme */ | ||
| 24 | .defaultSimpleSkin span.mce_bold {background-position:0 0} | ||
| 25 | .defaultSimpleSkin span.mce_italic {background-position:-60px 0} | ||
| 26 | .defaultSimpleSkin span.mce_underline {background-position:-140px 0} | ||
| 27 | .defaultSimpleSkin span.mce_strikethrough {background-position:-120px 0} | ||
| 28 | .defaultSimpleSkin span.mce_undo {background-position:-160px 0} | ||
| 29 | .defaultSimpleSkin span.mce_redo {background-position:-100px 0} | ||
| 30 | .defaultSimpleSkin span.mce_cleanup {background-position:-40px 0} | ||
| 31 | .defaultSimpleSkin span.mce_insertunorderedlist {background-position:-20px 0} | ||
| 32 | .defaultSimpleSkin span.mce_insertorderedlist {background-position:-80px 0} | ||
diff --git a/public/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css b/public/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css new file mode 100755 index 0000000..595809f --- /dev/null +++ b/public/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} | ||
| 2 | |||
| 3 | body {background: #FFF;} | ||
| 4 | .mceVisualAid {border: 1px dashed #BBB;} | ||
| 5 | |||
| 6 | /* IE */ | ||
| 7 | |||
| 8 | * html body { | ||
| 9 | scrollbar-3dlight-color: #F0F0EE; | ||
| 10 | scrollbar-arrow-color: #676662; | ||
| 11 | scrollbar-base-color: #F0F0EE; | ||
| 12 | scrollbar-darkshadow-color: #DDDDDD; | ||
| 13 | scrollbar-face-color: #E0E0DD; | ||
| 14 | scrollbar-highlight-color: #F0F0EE; | ||
| 15 | scrollbar-shadow-color: #F0F0EE; | ||
| 16 | scrollbar-track-color: #F5F5F5; | ||
| 17 | } | ||
diff --git a/public/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png b/public/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png new file mode 100755 index 0000000..527e349 --- /dev/null +++ b/public/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css b/public/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css new file mode 100755 index 0000000..cf6c35d --- /dev/null +++ b/public/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* Reset */ | ||
| 2 | .o2k7SimpleSkin table, .o2k7SimpleSkin tbody, .o2k7SimpleSkin a, .o2k7SimpleSkin img, .o2k7SimpleSkin tr, .o2k7SimpleSkin div, .o2k7SimpleSkin td, .o2k7SimpleSkin iframe, .o2k7SimpleSkin span, .o2k7SimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000} | ||
| 3 | |||
| 4 | /* Containers */ | ||
| 5 | .o2k7SimpleSkin {position:relative} | ||
| 6 | .o2k7SimpleSkin table.mceLayout {background:#E5EFFD; border:1px solid #ABC6DD;} | ||
| 7 | .o2k7SimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #ABC6DD;} | ||
| 8 | .o2k7SimpleSkin .mceToolbar {height:26px;} | ||
| 9 | |||
| 10 | /* Layout */ | ||
| 11 | .o2k7SimpleSkin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; } | ||
| 12 | .o2k7SimpleSkin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px} | ||
| 13 | .o2k7SimpleSkin span.mceIcon, .o2k7SimpleSkin img.mceIcon {display:block; width:20px; height:20px} | ||
| 14 | .o2k7SimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} | ||
| 15 | |||
| 16 | /* Button */ | ||
| 17 | .o2k7SimpleSkin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px} | ||
| 18 | .o2k7SimpleSkin a.mceButton span, .o2k7SimpleSkin a.mceButton img {margin:1px 0 0 1px} | ||
| 19 | .o2k7SimpleSkin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px} | ||
| 20 | .o2k7SimpleSkin a.mceButtonActive {background-position:0 -44px} | ||
| 21 | .o2k7SimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} | ||
| 22 | |||
| 23 | /* Separator */ | ||
| 24 | .o2k7SimpleSkin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px} | ||
| 25 | |||
| 26 | /* Theme */ | ||
| 27 | .o2k7SimpleSkin span.mce_bold {background-position:0 0} | ||
| 28 | .o2k7SimpleSkin span.mce_italic {background-position:-60px 0} | ||
| 29 | .o2k7SimpleSkin span.mce_underline {background-position:-140px 0} | ||
| 30 | .o2k7SimpleSkin span.mce_strikethrough {background-position:-120px 0} | ||
| 31 | .o2k7SimpleSkin span.mce_undo {background-position:-160px 0} | ||
| 32 | .o2k7SimpleSkin span.mce_redo {background-position:-100px 0} | ||
| 33 | .o2k7SimpleSkin span.mce_cleanup {background-position:-40px 0} | ||
| 34 | .o2k7SimpleSkin span.mce_insertunorderedlist {background-position:-20px 0} | ||
| 35 | .o2k7SimpleSkin span.mce_insertorderedlist {background-position:-80px 0} | ||
