effective_rte 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +5 -0
  3. data/Gemfile +3 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.md +70 -0
  6. data/Rakefile +36 -0
  7. data/app/assets/javascripts/effective_rte.js +6 -0
  8. data/app/assets/javascripts/jquery/jquery-migrate-1.2.1.js +521 -0
  9. data/app/assets/javascripts/wymeditor/iframe/effective/edit-code-division.png +0 -0
  10. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-aside.png +0 -0
  11. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-blockquote.png +0 -0
  12. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-carousel.png +0 -0
  13. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-command.png +0 -0
  14. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-details.png +0 -0
  15. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-figcaption.png +0 -0
  16. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-figure.png +0 -0
  17. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-footer.png +0 -0
  18. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-h1.png +0 -0
  19. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-h2.png +0 -0
  20. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-h3.png +0 -0
  21. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-h4.png +0 -0
  22. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-h5.png +0 -0
  23. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-h6.png +0 -0
  24. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-header.png +0 -0
  25. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-hgroup.png +0 -0
  26. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-mark.png +0 -0
  27. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-meter.png +0 -0
  28. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-nav.png +0 -0
  29. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-p.png +0 -0
  30. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-pre.png +0 -0
  31. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-progress.png +0 -0
  32. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-rp.png +0 -0
  33. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-rt.png +0 -0
  34. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-ruby.png +0 -0
  35. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-section.png +0 -0
  36. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-summary.png +0 -0
  37. data/app/assets/javascripts/wymeditor/iframe/effective/lbl-time.png +0 -0
  38. data/app/assets/javascripts/wymeditor/iframe/effective/readme.md +1 -0
  39. data/app/assets/javascripts/wymeditor/iframe/effective/wymiframe.css +114 -0
  40. data/app/assets/javascripts/wymeditor/iframe/effective/wymiframe.html +28 -0
  41. data/app/assets/javascripts/wymeditor/jquery.wymeditor.js +10858 -0
  42. data/app/assets/javascripts/wymeditor/lang/bg.js +45 -0
  43. data/app/assets/javascripts/wymeditor/lang/ca.js +45 -0
  44. data/app/assets/javascripts/wymeditor/lang/cs.js +45 -0
  45. data/app/assets/javascripts/wymeditor/lang/cy.js +45 -0
  46. data/app/assets/javascripts/wymeditor/lang/da.js +45 -0
  47. data/app/assets/javascripts/wymeditor/lang/de.js +45 -0
  48. data/app/assets/javascripts/wymeditor/lang/en.js +45 -0
  49. data/app/assets/javascripts/wymeditor/lang/es.js +45 -0
  50. data/app/assets/javascripts/wymeditor/lang/fa.js +46 -0
  51. data/app/assets/javascripts/wymeditor/lang/fi.js +44 -0
  52. data/app/assets/javascripts/wymeditor/lang/fr.js +45 -0
  53. data/app/assets/javascripts/wymeditor/lang/gl.js +45 -0
  54. data/app/assets/javascripts/wymeditor/lang/he.js +45 -0
  55. data/app/assets/javascripts/wymeditor/lang/hr.js +45 -0
  56. data/app/assets/javascripts/wymeditor/lang/hu.js +45 -0
  57. data/app/assets/javascripts/wymeditor/lang/it.js +45 -0
  58. data/app/assets/javascripts/wymeditor/lang/ja.js +44 -0
  59. data/app/assets/javascripts/wymeditor/lang/lt.js +45 -0
  60. data/app/assets/javascripts/wymeditor/lang/nb.js +45 -0
  61. data/app/assets/javascripts/wymeditor/lang/nl.js +45 -0
  62. data/app/assets/javascripts/wymeditor/lang/nn.js +45 -0
  63. data/app/assets/javascripts/wymeditor/lang/pl.js +45 -0
  64. data/app/assets/javascripts/wymeditor/lang/pt-br.js +45 -0
  65. data/app/assets/javascripts/wymeditor/lang/pt.js +45 -0
  66. data/app/assets/javascripts/wymeditor/lang/ru.js +45 -0
  67. data/app/assets/javascripts/wymeditor/lang/sk.js +45 -0
  68. data/app/assets/javascripts/wymeditor/lang/sv.js +46 -0
  69. data/app/assets/javascripts/wymeditor/lang/tr.js +45 -0
  70. data/app/assets/javascripts/wymeditor/lang/zh_cn.js +47 -0
  71. data/app/assets/javascripts/wymeditor/plugins/embed/jquery.wymeditor.embed.js +82 -0
  72. data/app/assets/javascripts/wymeditor/plugins/html_cleanup/jquery.wymeditor.html_cleanup.js +43 -0
  73. data/app/assets/javascripts/wymeditor/plugins/insert_assets/insert_assets.png +0 -0
  74. data/app/assets/javascripts/wymeditor/plugins/insert_assets/jquery.wymeditor.insert_assets.js +89 -0
  75. data/app/assets/javascripts/wymeditor/plugins/list/jquery.wymeditor.list.js +60 -0
  76. data/app/assets/javascripts/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +77 -0
  77. data/app/assets/javascripts/wymeditor/plugins/resizable/readme.txt +124 -0
  78. data/app/assets/javascripts/wymeditor/plugins/table/jquery.wymeditor.table.js +721 -0
  79. data/app/assets/javascripts/wymeditor/plugins/table/table_delete_column.png +0 -0
  80. data/app/assets/javascripts/wymeditor/plugins/table/table_delete_row.png +0 -0
  81. data/app/assets/javascripts/wymeditor/plugins/table/table_insert_column.png +0 -0
  82. data/app/assets/javascripts/wymeditor/plugins/table/table_insert_row.png +0 -0
  83. data/app/assets/javascripts/wymeditor/plugins/table/table_join_row.png +0 -0
  84. data/app/assets/javascripts/wymeditor/plugins/tidy/README +19 -0
  85. data/app/assets/javascripts/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js +78 -0
  86. data/app/assets/javascripts/wymeditor/plugins/tidy/tidy.php +58 -0
  87. data/app/assets/javascripts/wymeditor/plugins/tidy/wand.png +0 -0
  88. data/app/assets/javascripts/wymeditor/skins/effective/icons.png +0 -0
  89. data/app/assets/javascripts/wymeditor/skins/effective/icons/arrow-return-180.png +0 -0
  90. data/app/assets/javascripts/wymeditor/skins/effective/icons/arrow-return.png +0 -0
  91. data/app/assets/javascripts/wymeditor/skins/effective/icons/chain-unchain.png +0 -0
  92. data/app/assets/javascripts/wymeditor/skins/effective/icons/chain.png +0 -0
  93. data/app/assets/javascripts/wymeditor/skins/effective/icons/clipboard-paste-word.png +0 -0
  94. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-alignment-center.png +0 -0
  95. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-alignment-right.png +0 -0
  96. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-alignment.png +0 -0
  97. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-bold.png +0 -0
  98. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-code.png +0 -0
  99. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-heading-1.png +0 -0
  100. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-heading-2.png +0 -0
  101. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-heading-3.png +0 -0
  102. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-heading-4.png +0 -0
  103. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-heading-5.png +0 -0
  104. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-heading-6.png +0 -0
  105. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-indent.png +0 -0
  106. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-italic.png +0 -0
  107. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-list-order.png +0 -0
  108. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-list.png +0 -0
  109. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-outdent.png +0 -0
  110. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-pilcrow.png +0 -0
  111. data/app/assets/javascripts/wymeditor/skins/effective/icons/edit-quotation.png +0 -0
  112. data/app/assets/javascripts/wymeditor/skins/effective/icons/eye.png +0 -0
  113. data/app/assets/javascripts/wymeditor/skins/effective/icons/image.png +0 -0
  114. data/app/assets/javascripts/wymeditor/skins/effective/icons/insert-br.png +0 -0
  115. data/app/assets/javascripts/wymeditor/skins/effective/icons/slides-stack.png +0 -0
  116. data/app/assets/javascripts/wymeditor/skins/effective/icons/table.png +0 -0
  117. data/app/assets/javascripts/wymeditor/skins/effective/skin.css +195 -0
  118. data/app/assets/javascripts/wymeditor/skins/effective/skin.js +40 -0
  119. data/app/assets/stylesheets/effective_rte.css +2 -0
  120. data/app/views/effective_rte/_editor.html.erb +13 -0
  121. data/effective_rte.gemspec +31 -0
  122. data/lib/effective_rte.rb +16 -0
  123. data/lib/effective_rte/engine.rb +24 -0
  124. data/lib/effective_rte/helpers/form_builder.rb +13 -0
  125. data/lib/effective_rte/helpers/form_helper.rb +58 -0
  126. data/lib/effective_rte/hooks/formtastic.rb +12 -0
  127. data/lib/effective_rte/utils.rb +37 -0
  128. data/lib/effective_rte/version.rb +3 -0
  129. metadata +211 -0
@@ -0,0 +1,19 @@
1
+ WYMeditor : what you see is What You Mean web-based editor
2
+ Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
3
+ Dual licensed under the MIT (MIT-license.txt)
4
+ and GPL (GPL-license.txt) licenses.
5
+
6
+ For further information visit:
7
+ http://www.wymeditor.org/
8
+
9
+ File Name:
10
+ README - HTML Tidy plugin for WYMeditor
11
+
12
+ File Authors:
13
+ Jean-François Hovinne (jf.hovinne a-t wymeditor dotorg)
14
+
15
+ Credits:
16
+ 'HTML Tidy' by Dave Ragget - http://tidy.sourceforge.net/
17
+ Icon 'wand' by Mark James - http://famfamfam.com/
18
+
19
+ WYMeditor documentation is available online at http://www.wymeditor.org/
@@ -0,0 +1,78 @@
1
+ /*
2
+ * WYMeditor : what you see is What You Mean web-based editor
3
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4
+ * Dual licensed under the MIT (MIT-license.txt)
5
+ * and GPL (GPL-license.txt) licenses.
6
+ *
7
+ * For further information visit:
8
+ * http://www.wymeditor.org/
9
+ *
10
+ * File Name:
11
+ * jquery.wymeditor.tidy.js
12
+ * HTML Tidy plugin for WYMeditor
13
+ *
14
+ * File Authors:
15
+ * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg)
16
+ */
17
+
18
+ //WymTidy constructor
19
+ function WymTidy(options, wym) {
20
+ var wand_url = wym._options.basePath + "plugins/tidy/wand.png";
21
+ options = jQuery.extend({
22
+ sUrl: wym._options.basePath + "plugins/tidy/tidy.php",
23
+ sButtonHtml: "" +
24
+ "<li class='wym_tools_tidy'>" +
25
+ "<a name='CleanUp' href='#'" +
26
+ " style='background-image: url(" + wand_url +")'>" +
27
+ "Clean up HTML" +
28
+ "</a>" +
29
+ "</li>",
30
+
31
+ sButtonSelector: "li.wym_tools_tidy a"
32
+
33
+ }, options);
34
+
35
+ this._options = options;
36
+ this._wym = wym;
37
+ }
38
+
39
+ //Extend WYMeditor
40
+ WYMeditor.editor.prototype.tidy = function(options) {
41
+ var tidy = new WymTidy(options, this);
42
+ return tidy;
43
+ };
44
+
45
+
46
+ //WymTidy initialization
47
+ WymTidy.prototype.init = function() {
48
+ var tidy = this;
49
+
50
+ jQuery(this._wym._box).find(
51
+ this._wym._options.toolsSelector + this._wym._options.toolsListSelector)
52
+ .append(this._options.sButtonHtml);
53
+
54
+ //handle click event
55
+ jQuery(this._wym._box).find(this._options.sButtonSelector).click(function() {
56
+ tidy.cleanup();
57
+ return(false);
58
+ });
59
+ };
60
+
61
+ //WymTidy cleanup
62
+ WymTidy.prototype.cleanup = function() {
63
+ var wym = this._wym;
64
+ var html = "<html><body>" + wym.xhtml() + "</body></html>";
65
+
66
+ jQuery.post(this._options.sUrl, { html: html}, function(data) {
67
+ if (data.length > 0 && data != '0') {
68
+ if (data.indexOf("<?php") === 0) {
69
+ wym.status("Ooops... Is PHP installed?");
70
+ } else {
71
+ wym._html(data);
72
+ wym.status("HTML has been cleaned up.");
73
+ }
74
+ } else {
75
+ wym.status("An error occurred.");
76
+ }
77
+ });
78
+ };
@@ -0,0 +1,58 @@
1
+ <?php
2
+
3
+ // SECURITY WARNING: read the comment below before removing this line!
4
+ die ('This functionality is disabled by default. Please see plugins/tidy/tidy.php for additional information on how to setup Tidy.');
5
+
6
+ /*
7
+
8
+ WARNING: ENABLING THIS FILE IS NOT SECURE!
9
+
10
+ Generally speaking, it is a bad idea to have a script that outputs what you send it.
11
+ It could easily be used to steal cookies from you, for instance if:
12
+ www.badsite.com has a hidden IFRAME with SRC="/path/to/tidy.php?html="+escape("... some JavaScript that sends your cookies to badsite.org ...")
13
+
14
+ You could filter out <script> tags, onclick, onblur, onload, onmouseover... attributes
15
+ if you *really* need this functionality. Or, even better, you could allow only the tags and
16
+ attributes that you explicitly allow (future versions of WYMeditor might provide this
17
+ functionality by default - please contribute).
18
+
19
+ Be warned that providing authentication is NOT enough to guard you agains the attack. When
20
+ someone is authenticated in your page and visits www.badsite.com, the IFRAME has the proper
21
+ authentication so nothing has changed.
22
+
23
+ */
24
+
25
+ if (get_magic_quotes_gpc()) $html = stripslashes($_REQUEST['html']);
26
+ else $html = $_REQUEST['html'];
27
+
28
+ if(strlen($html) > 0) {
29
+
30
+ // Specify configuration
31
+ $config = array(
32
+ 'bare' => true,
33
+ 'clean' => true,
34
+ 'doctype' => 'strict',
35
+ 'drop-empty-paras' => true,
36
+ 'drop-font-tags' => true,
37
+ 'drop-proprietary-attributes' => true,
38
+ 'enclose-block-text' => true,
39
+ 'indent' => false,
40
+ 'join-classes' => true,
41
+ 'join-styles' => true,
42
+ 'logical-emphasis' => true,
43
+ 'output-xhtml' => true,
44
+ 'show-body-only' => true,
45
+ 'wrap' => 0);
46
+
47
+ // Tidy
48
+ $tidy = new tidy;
49
+ $tidy->parseString($html, $config, 'utf8');
50
+ $tidy->cleanRepair();
51
+
52
+ // Output
53
+ echo $tidy;
54
+ } else {
55
+
56
+ echo ('0');
57
+ }
58
+ ?>
@@ -0,0 +1,195 @@
1
+ /*
2
+ * WYMeditor : what you see is What You Mean web-based editor
3
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4
+ * Dual licensed under the MIT (MIT-license.txt)
5
+ * and GPL (GPL-license.txt) licenses.
6
+ *
7
+ * For further information visit:
8
+ * http://www.wymeditor.org/
9
+ *
10
+ * File Name:
11
+ * skin.css
12
+ * main stylesheet for the default WYMeditor skin
13
+ * See the documentation for more info.
14
+ *
15
+ * File Authors:
16
+ * Daniel Reszka (d.reszka a-t wymeditor dotorg)
17
+ */
18
+
19
+ /*TRYING TO RESET STYLES THAT MAY INTERFERE WITH WYMEDITOR*/
20
+ .wym_skin_effective p, .wym_skin_effective h2, .wym_skin_effective h3,
21
+ .wym_skin_effective ul, .wym_skin_effective li { background: none; margin: 0; padding: 0; border-width:0; list-style: none; }
22
+
23
+ /*HIDDEN BY DEFAULT*/
24
+ .wym_skin_effective .wym_area_left { display: none; }
25
+ .wym_skin_effective .wym_area_right { display: block; }
26
+
27
+
28
+ /*TYPO*/
29
+ .wym_skin_effective { font-size: 62.5%; font-family: Verdana, Arial, sans-serif; border: none; padding: 0; }
30
+ .wym_skin_effective h2 { font-size: 110%; /* = 11px */}
31
+ .wym_skin_effective h3 { font-size: 100%; /* = 10px */}
32
+ .wym_skin_effective li { font-size: 100%; /* = 10px */}
33
+
34
+
35
+ /*WYM_BOX*/
36
+ .wym_box { display: inline-block; width: 100%;}
37
+ .wym_skin_effective { border: 1px solid gray; background: #f2f2f2; padding: 5px; margin-top: 0; }
38
+ .wym_skin_effective:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
39
+ * html .wym_skin_effective { height: 1%;}
40
+
41
+
42
+ /*WYM_HTML*/
43
+ .wym_skin_effective .wym_html { width: 98%;}
44
+ .wym_skin_effective .wym_html textarea { width: 100%; height: 500px !important; border: 1px solid gray; background: white; font-size: 14px; font-family: Monaco, "Courier New", Courier, monospace;}
45
+
46
+
47
+ /*WYM_IFRAME*/
48
+ .wym_skin_effective .wym_iframe { width: 99.7%; height: 503px; }
49
+ .wym_skin_effective .wym_iframe iframe { width: 100%; height: 500px !important; border: 1px solid gray; background: white }
50
+
51
+
52
+ /*AREAS*/
53
+ .wym_skin_effective .wym_area_left { width: 150px; float: left;}
54
+ .wym_skin_effective .wym_area_right { width: 150px; float: right;}
55
+ .wym_skin_effective .wym_area_bottom { height: 1%; clear: both;}
56
+ * html .wym_skin_effective .wym_area_main { height: 1%; }
57
+ * html .wym_skin_effective .wym_area_top { height: 1%; }
58
+ *+html .wym_skin_effective .wym_area_top { height: 1%; }
59
+
60
+ .wym_area_top { padding: 0 0 5px 0; }
61
+
62
+ /*SECTIONS SYSTEM*/
63
+
64
+ /*common defaults for all sections*/
65
+ .wym_skin_effective .wym_section { }
66
+ .wym_skin_effective .wym_section h2,
67
+ .wym_skin_effective .wym_section h3 { padding: 1px 3px; margin: 0; }
68
+ .wym_skin_effective .wym_section a { padding: 0 3px; display: block; text-decoration: none; color: black; }
69
+ .wym_skin_effective .wym_section a:hover { background-color: yellow !important; }
70
+ .wym_skin_effective .wym_section h2 { display: none; }
71
+ .wym_skin_effective .wym_section { }
72
+ .wym_skin_effective .wym_section ul:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
73
+ * html .wym_skin_effective .wym_section ul { height: 1%;}
74
+
75
+ .wym_skin_effective .wym_panel { }
76
+ .wym_skin_effective .wym_panel h2 { display: block; }
77
+
78
+ /*option: add this class to a section to make it render as a dropdown menu*/
79
+ .wym_skin_effective .wym_dropdown h2 { display: block; }
80
+ .wym_skin_effective .wym_dropdown ul { display: none; position: absolute; background: white; }
81
+ .wym_skin_effective .wym_dropdown:hover ul,
82
+ .wym_skin_effective .wym_dropdown.hover ul { display: block; }
83
+
84
+ .wym_skin_effective .wym_buttons li { float:left;}
85
+ .wym_skin_effective .wym_buttons a { width: 20px; height: 20px; overflow: hidden; padding: 2px }
86
+
87
+ .wym_skin_effective .wym_buttons li a { background: url(icons.png) no-repeat; text-indent: -9999px;}
88
+ .wym_skin_effective .wym_buttons li.wym_tools_strong a { background: url(icons/edit-bold.png) 50% 50% no-repeat; }
89
+ .wym_skin_effective .wym_buttons li.wym_tools_emphasis a { background: url(icons/edit-italic.png) 50% 50% no-repeat; }
90
+ .wym_skin_effective .wym_buttons li.wym_tools_superscript a { background-position: 0 -430px;}
91
+ .wym_skin_effective .wym_buttons li.wym_tools_subscript a { background-position: 0 -454px;}
92
+ .wym_skin_effective .wym_buttons li.wym_tools_ordered_list a { background: url(icons/edit-list-order.png) 50% 50% no-repeat; }
93
+ .wym_skin_effective .wym_buttons li.wym_tools_unordered_list a{ background: url(icons/edit-list.png) 50% 50% no-repeat; }
94
+ .wym_skin_effective .wym_buttons li.wym_tools_indent a { background: url(icons/edit-indent.png) 50% 50% no-repeat; }
95
+ .wym_skin_effective .wym_buttons li.wym_tools_outdent a { background: url(icons/edit-outdent.png) 50% 50% no-repeat; }
96
+ .wym_skin_effective .wym_buttons li.wym_tools_undo a { background: url(icons/arrow-return-180.png) 50% 50% no-repeat; }
97
+ .wym_skin_effective .wym_buttons li.wym_tools_redo a { background: url(icons/arrow-return.png) 50% 50% no-repeat; }
98
+ .wym_skin_effective .wym_buttons li.wym_tools_link a { background: url(icons/chain.png) 50% 50% no-repeat; }
99
+ .wym_skin_effective .wym_buttons li.wym_tools_unlink a { background: url(icons/chain-unchain.png) 50% 50% no-repeat; }
100
+ .wym_skin_effective .wym_buttons li.wym_tools_image a { background-position: 0 -121px; }
101
+ .wym_skin_effective .wym_buttons li.wym_tools_table a { background: url(icons/table.png) 50% 50% no-repeat; }
102
+ .wym_skin_effective .wym_buttons li.wym_tools_paste a { background: url(icons/clipboard-paste-word.png) 50% 50% no-repeat; }
103
+ .wym_skin_effective .wym_buttons li.wym_tools_html a { background-position: 0 -193px;}
104
+ .wym_skin_effective .wym_buttons li.wym_tools_preview a { background: url(icons/eye.png) 50% 50% no-repeat; }
105
+ .wym_skin_effective .wym_buttons li.wym_tools_line_break a { background: url(icons/insert-br.png) 50% 50% no-repeat; }
106
+ .wym_skin_effective .wym_buttons li.wym_tools_insert_asset a { background: url(icons/image.png) 50% 50% no-repeat; }
107
+
108
+ /* CLASSES */
109
+ .wym_skin_effective div.wym_classes {
110
+ border-left: solid 1px gray;
111
+ border-right: solid 1px gray;
112
+ margin: 0px 8px 0px 8px;
113
+ padding: 0px 8px 0px 8px;
114
+ }
115
+
116
+ .wym_skin_effective .wym_tools_emphasis,
117
+ .wym_skin_effective .wym_tools_unlink,
118
+ .wym_skin_effective .wym_tools_outdent,
119
+ .wym_skin_effective .wym_tools_paste,
120
+ .wym_skin_effective .wym_tools_redo {
121
+ border-right: solid 1px gray;
122
+ margin-right: 8px;
123
+ padding-right: 8px;
124
+ }
125
+
126
+ .wym_skin_effective li.wym_classes_carousel a { background: url(icons/slides-stack.png) 50% 50% no-repeat; }
127
+ .wym_skin_effective li.wym_classes_align-right a { background: url(icons.png) no-repeat; text-indent: -9999px; background-position: 0 -289px; }
128
+ .wym_skin_effective li.wym_classes_align-left a { background: url(icons.png) no-repeat; text-indent: -9999px; background-position: 0 -312px; }
129
+
130
+ /*DECORATION*/
131
+ .wym_skin_effective .wym_section h2 { background: #ddd; border: solid gray; border-width: 0 0 1px;}
132
+ .wym_skin_effective .wym_section h2 span { color: gray;}
133
+ .wym_skin_effective .wym_panel { }
134
+ .wym_skin_effective .wym_panel ul { }
135
+ .wym_skin_effective .wym_dropdown { padding: 0; border: solid gray; border-width: 1px 1px 0 1px; }
136
+ .wym_skin_effective .wym_dropdown ul { border: solid gray; border-width: 0 1px 1px 1px; margin-left: -1px; padding: 5px 10px 5px 3px;}
137
+
138
+ /*DIALOGS*/
139
+ .wym_dialog div.row { margin-bottom: 5px;}
140
+ .wym_dialog div.row input { margin-right: 5px;}
141
+ .wym_dialog div.row label { float: left; width: 120px; display: block; text-align: right; margin-right: 10px; }
142
+ .wym_dialog div.row-indent { padding-left: 160px; }
143
+ /*autoclearing*/
144
+ .wym_dialog div.row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
145
+ .wym_dialog div.row { display: inline-block; }
146
+ /* Hides from IE-mac \*/
147
+ * html .wym_dialog div.row { height: 1%; }
148
+ .wym_dialog div.row { display: block; }
149
+ /* End hide from IE-mac */
150
+
151
+ /*WYMEDITOR_LINK*/
152
+ a.wym_wymeditor_link { text-indent: -9999px; float: right; display: block; width: 50px; height: 15px; background: url(../wymeditor_icon.png); overflow: hidden; text-decoration: none; }
153
+
154
+ .wym_skin_effective .wym_containers,
155
+ .wym_skin_effective .wym_classes {
156
+ float: left;
157
+ }
158
+
159
+ .wym_skin_effective .wym_containers li,
160
+ .wym_skin_effective .wym_classes li {
161
+ float: left;
162
+ }
163
+
164
+ .wym_skin_effective .wym_containers a,
165
+ .wym_skin_effective .wym_classes a {
166
+ width: 20px;
167
+ height: 20px;
168
+ display: block;
169
+ text-indent: -9999px;
170
+ overflow: hidden;
171
+ line-height: 1;
172
+ padding: 2px;
173
+ }
174
+
175
+ .wym_skin_effective .wym_containers h2 { display: none; }
176
+ .wym_skin_effective .wym_containers_p a { background: url(icons/edit-pilcrow.png) 50% 50% no-repeat; }
177
+ .wym_skin_effective .wym_containers_h1 a { background: url(icons/edit-heading-1.png) 50% 50% no-repeat; }
178
+ .wym_skin_effective .wym_containers_h2 a { background: url(icons/edit-heading-2.png) 50% 50% no-repeat; }
179
+ .wym_skin_effective .wym_containers_h3 a { background: url(icons/edit-heading-3.png) 50% 50% no-repeat; }
180
+ .wym_skin_effective .wym_containers_h4 a { background: url(icons/edit-heading-4.png) 50% 50% no-repeat; }
181
+ .wym_skin_effective .wym_containers_blockquote a { background: url(icons/edit-quotation.png) 50% 50% no-repeat; }
182
+ .wym_skin_effective .wym_containers_h5,
183
+ .wym_skin_effective .wym_containers_h6,
184
+ .wym_skin_effective .wym_containers_pre,
185
+ .wym_skin_effective .wym_containers_th,
186
+ .wym_skin_effective .wym_containers_h5 a,
187
+ .wym_skin_effective .wym_containers_h6 a,
188
+ .wym_skin_effective .wym_containers_pre a,
189
+ .wym_skin_effective .wym_containers_th a { display: none !important; }
190
+
191
+ .wym_skin_effective .wym_classes h2 { display: none; }
192
+
193
+ .wym_skin_effective .wym_buttons li.wym_tools_html { float: right; }
194
+
195
+ .page_template_meta { top: 35px ;}
@@ -0,0 +1,40 @@
1
+ WYMeditor.SKINS['effective'] = {
2
+
3
+ init: function(wym) {
4
+
5
+ //render following sections as panels
6
+ jQuery(wym._box).find(wym._options.classesSelector)
7
+ .addClass("wym_panel");
8
+
9
+ //render following sections as buttons
10
+ jQuery(wym._box).find(wym._options.toolsSelector)
11
+ .addClass("wym_buttons");
12
+
13
+ //render following sections as dropdown menus
14
+ // jQuery(wym._box).find(wym._options.containersSelector)
15
+ // .addClass("wym_dropdown")
16
+ // .find(WYMeditor.H2)
17
+ // .append("<span> ></span>");
18
+
19
+ // auto add some margin to the main area sides if left area
20
+ // or right area are not empty (if they contain sections)
21
+ jQuery(wym._box).find("div.wym_area_right ul")
22
+ .parents("div.wym_area_right").show()
23
+ .parents(wym._options.boxSelector)
24
+ .find("div.wym_area_main")
25
+ .css({"margin-right": "155px"});
26
+
27
+ jQuery(wym._box).find("div.wym_area_left ul")
28
+ .parents("div.wym_area_left").show()
29
+ .parents(wym._options.boxSelector)
30
+ .find("div.wym_area_main")
31
+ .css({"margin-left": "155px"});
32
+
33
+ //make hover work under IE < 7
34
+ jQuery(wym._box).find(".wym_section").hover(function(){
35
+ jQuery(this).addClass("hover");
36
+ },function(){
37
+ jQuery(this).removeClass("hover");
38
+ });
39
+ }
40
+ };