Black Studio TinyMCE Widget - Version 1.0.0

Version Description

  • Added full image options when adding content from media library
  • Added german translation (Contributor: Christian Foellmann)
  • Overall Javascript code optimization
  • Better Javascript compression
  • Fixed editor background color
  • Fixed compatibility issue with "WP Page Widget" plugin
  • Fixed issue about editor partially hidden on narrow screens
Download this release

Release Info

Developer marcochiesi
Plugin Icon 128x128 Black Studio TinyMCE Widget
Version 1.0.0
Comparing to
See all releases

Code changes from version 0.9.5 to 1.0.0

black-studio-tinymce-widget.css CHANGED
@@ -9,6 +9,7 @@
9
  }
10
 
11
  .editor_container {
 
12
  border-color: #CCC #CCC #DFDFDF;
13
  border-style: solid;
14
  border-width: 1px;
9
  }
10
 
11
  .editor_container {
12
+ background-color: #FFF;
13
  border-color: #CCC #CCC #DFDFDF;
14
  border-style: solid;
15
  border-width: 1px;
black-studio-tinymce-widget.js CHANGED
@@ -1 +1 @@
1
- eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('J o;J Y;J X;8 V(1){2(\'#\'+1).I("14");i(f(d)=="j"&&f(d.z)=="8"){B(1);i(f(o.q[\'6-5-4-3\'])=="j"){o.q[1]=o.q[\'6-5-4-3\'];o.q[1]["17"]=1;15{4.18(4.16({},o.q[\'6-5-4-3\'],o.q[1]))}13(e){10(e)}}K{d.z("11",O,1)}}}8 B(1){i(f(d)=="j"&&f(d.z)=="8"){i(f(d.n(1))=="j"){M=d.n(1).12();d.z("1e",O,1);2(\'h#\'+1).G(M)}}}8 C(1){2(\'7.3-b:u(#\'+1+\') s[1^=3-6-5-4][1$=x][Q=p]\').R(8(){i(2(\'7.3:u(#\'+1+\') :1j\').N()==0&&f(d.n(1))!="j"&&2(\'#\'+1).E(\':D\')){2(\'a[1^=3-6-5-4][1$=p]\',2(9).c(\'7.3-b\')).g()}K i(f(d.n(1))!="j"){L(8(){C(1);1=S},P)}})}8 F(1){2(\'7.3-b:u(#\'+1+\') s[1^=3-6-5-4][1$=x][Q=p]\').R(8(){i(2.r==0&&f(d.n(1))!="j"&&2(\'#\'+1).E(\':D\')){2(\'a[1^=3-6-5-4][1$=p]\',2(9).c(\'7.3-b\')).g()}K i(2(\'7.3:u(#\'+1+\') 7.3-b\').E(\':D\')&&f(d.n(1))!="j"){L(8(){F(1);1=S},P)}})}2(v).1d(8(){2(\'7.3:u(h[1^=3-6-5-4]) a.3-1i\').t(\'g\',8(l){l.w();k=2(\'h[1^=3-6-5-4]\',2(9).c(\'7.3\'));C(k.m(\'1\'))});2(v).A("y").g.W(2(v).A("y").g.T());2(\'7.3[1*=6-5-4] s[1h=1g]\').t(\'g\',8(l){l.w();k=2(\'h[1^=3-6-5-4]\',2(9).c(\'7.3\'));i(f(d.n(k.m(\'1\')))=="j"){B(k.m(\'1\'))}2(9).1b(\'U\').U(8(l,1a,1f){k=2(\'h[1^=3-6-5-4]\',2(9).c(\'7.3-b\'));F(k.m(\'1\'))})});2(v).A("y").g.W(2(v).A("y").g.T());2(\'a[1^=3-6-5-4][1$=p]\').t(\'g\',8(l){l.w();2(\'s[1^=3-6-5-4][1$=x]\',2(9).c(\'7.3-b\')).G(\'p\');2(9).I(\'r\');2(\'a[1^=3-6-5-4][1$=H]\',2(9).c(\'7.3-b\')).Z(\'r\');V(2(\'h[1^=3-6-5-4]\',2(9).c(\'7.3-b\')).m(\'1\'))});2(\'a[1^=3-6-5-4][1$=H]\').t(\'g\',8(l){l.w();2(\'s[1^=3-6-5-4][1$=x]\',2(9).c(\'7.3-b\')).G(\'H\');2(9).I(\'r\');2(\'a[1^=3-6-5-4][1$=p]\',2(9).c(\'7.3-b\')).Z(\'r\');B(2(\'h[1^=3-6-5-4]\',2(9).c(\'7.3-b\')).m(\'1\'))});2(\'.19 a\').t(\'g\',8(){Y=2(\'h[1^=3-6-5-4]\',2(9).c(\'7.3-b\')).n();X=2(\'h[1^=3-6-5-4]\',2(9).c(\'7.3-b\')).m(\'1\')});i(2(\'1c.1k\').N()>0){k=2(\'h[1^=3-6-5-4]\');C(k.m(\'1\'))}});',62,83,'|id|jQuery|widget|tinymce|studio|black|div|function|this||inside|closest|tinyMCE||typeof|click|textarea|if|object|txt_area|event|attr|get|tinyMCEPreInit|visual|mceInit|active|input|live|has|document|preventDefault|type|events|execCommand|data|black_studio_deactivate_visual_editor|black_studio_open_deferred_activate_visual_editor|visible|is|black_studio_ajax_deferred_activate_visual_editor|val|html|addClass|var|else|setTimeout|content|size|false|100|value|each|null|pop|ajaxSuccess|black_studio_activate_visual_editor|unshift|wpActiveEditor|edCanvas|removeClass|alert|mceAddControl|getContent|catch|mceEditor|try|extend|elements|init|editor_media_buttons|xhr|unbind|body|ready|mceRemoveControl|settings|savewidget|name|action|animated|widgets_access'.split('|')))
1
+ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('8 x;8 U;8 W;(6(c){6 d(g){c("#"+g).Q("18");r(p(9)=="t"&&p(9.I)=="6"){b(g);r(p(x.A["5-4-3-1"])=="t"){x.A[g]=x.A["5-4-3-1"];x.A[g]["1q"]=g;1r{3.1t(3.1k({},x.A["5-4-3-1"],x.A[g]))}1f(f){1l(f)}}N{9.I("1m",X,g)}}}6 b(g){r(p(9)=="t"&&p(9.I)=="6"){r(p(9.w(g))=="t"){8 f=9.w(g).1s();9.I("1n",X,g);c("q#"+g).P(f)}}}6 a(f){c("7.1-s:B(#"+f+") F[2^=1-5-4-3][2$=K][13=y]").14(6(){r(c("7.1:B(#"+f+") :1e").11()==0&&p(9.w(f))!="t"&&c("#"+f).O(":J")){c("a[2^=1-5-4-3][2$=y]",c(o).v("7.1-s")).n()}N{r(p(9.w(f))!="t"){Z(6(){a(f);f=Y},M)}}})}6 e(f){c("7.1-s:B(#"+f+") F[2^=1-5-4-3][2$=K][13=y]").14(6(){r(c.D==0&&p(9.w(f))!="t"&&c("#"+f).O(":J")){c("a[2^=1-5-4-3][2$=y]",c(o).v("7.1-s")).n()}N{r(c("7.1:B(#"+f+") 7.1-s").O(":J")&&p(9.w(f))!="t"){Z(6(){e(f);f=Y},M)}}})}c(E).17(6(){c("7.1:B(q[2^=1-5-4-3]) a.1-19").C("n",6(g){g.G();8 i=c(o).v("7.1");8 h=c("q[2^=1-5-4-3]",i);c("#1a-1b").S("1c","J");i.S("15","16").S("z-1u","M");a(h.u("2"))});c(E).L("H").n.V(c(E).L("H").n.12());c("7.1[2*=5-4-3] F[1p=1o]").C("n",6(g){g.G();8 i=c(o).v("7.1");8 h=c("q[2^=1-5-4-3]",i);r(p(9.w(h.u("2")))=="t"){b(h.u("2"))}c(o).1d("T").T(6(k,l,j){8 m=c("q[2^=1-5-4-3]",c(o).v("7.1-s"));e(m.u("2"))})});c(E).L("H").n.V(c(E).L("H").n.12());c("a[2^=1-5-4-3][2$=y]").C("n",6(g){g.G();8 h=c(o).v("7.1-s");c("F[2^=1-5-4-3][2$=K]",h).P("y");c(o).Q("D");c("a[2^=1-5-4-3][2$=R]",h).10("D");d(c("q[2^=1-5-4-3]",h).u("2"))});c("a[2^=1-5-4-3][2$=R]").C("n",6(g){g.G();8 h=c(o).v("7.1-s");c("F[2^=1-5-4-3][2$=K]",h).P("R");c(o).Q("D");c("a[2^=1-5-4-3][2$=y]",h).10("D");b(c("q[2^=1-5-4-3]",h).u("2"))});c(".1j a").C("n",6(){8 g=c(o).v("7.1-s");U=c("q[2^=1-5-4-3]",g).w();W=c("q[2^=1-5-4-3]",g).u("2")});r(c("1i.1h").11()>0){8 f=c("q[2^=1-5-4-3]");a(f.u("2"))}})})(1g);',62,93,'|widget|id|tinymce|studio|black|function|div|var|tinyMCE||||||||||||||click|this|typeof|textarea|if|inside|object|attr|closest|get|tinyMCEPreInit|visual||mceInit|has|live|active|document|input|preventDefault|events|execCommand|visible|type|data|100|else|is|val|addClass|html|css|ajaxSuccess|edCanvas|unshift|wpActiveEditor|false|null|setTimeout|removeClass|size|pop|value|each|position|relative|ready|mceEditor|action|wpbody|content|overflow|unbind|animated|catch|jQuery|widgets_access|body|editor_media_buttons|extend|alert|mceAddControl|mceRemoveControl|savewidget|name|elements|try|getContent|init|index'.split('|'),0,{}))
black-studio-tinymce-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Black Studio TinyMCE Widget
4
  Plugin URI: http://wordpress.org/extend/plugins/black-studio-tinymce-widget/
5
  Description: Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
6
- Version: 0.9.5
7
  Author: Black Studio
8
  Author URI: http://www.blackstudio.it
9
  License: GPL2
@@ -11,7 +11,7 @@ License: GPL2
11
 
12
  global $black_studio_tinymce_widget_version;
13
  global $black_studio_tinymce_widget_dev_mode;
14
- $black_studio_tinymce_widget_version = "0.9.5"; // This is used internally - should be the same reported on the plugin header
15
  $black_studio_tinymce_widget_dev_mode = false;
16
 
17
  /* Widget class */
@@ -103,7 +103,15 @@ function black_studio_tinymce_widgets_init() {
103
  add_action('admin_init', 'black_studio_tinymce_admin_init');
104
  function black_studio_tinymce_admin_init() {
105
  global $pagenow;
 
106
  if ($pagenow == "widgets.php") {
 
 
 
 
 
 
 
107
  add_action( 'admin_head', 'black_studio_tinymce_load_tiny_mce');
108
  add_filter( 'tiny_mce_before_init', 'black_studio_tinymce_init_editor', 20);
109
  add_action( 'admin_print_scripts', 'black_studio_tinymce_scripts');
@@ -205,4 +213,13 @@ function black_studio_tinymce_footer_scripts() {
205
  }
206
  }
207
 
208
- ?>
 
 
 
 
 
 
 
 
 
3
  Plugin Name: Black Studio TinyMCE Widget
4
  Plugin URI: http://wordpress.org/extend/plugins/black-studio-tinymce-widget/
5
  Description: Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
6
+ Version: 1.0.0
7
  Author: Black Studio
8
  Author URI: http://www.blackstudio.it
9
  License: GPL2
11
 
12
  global $black_studio_tinymce_widget_version;
13
  global $black_studio_tinymce_widget_dev_mode;
14
+ $black_studio_tinymce_widget_version = "1.0.0"; // This is used internally - should be the same reported on the plugin header
15
  $black_studio_tinymce_widget_dev_mode = false;
16
 
17
  /* Widget class */
103
  add_action('admin_init', 'black_studio_tinymce_admin_init');
104
  function black_studio_tinymce_admin_init() {
105
  global $pagenow;
106
+ $load_editor = false;
107
  if ($pagenow == "widgets.php") {
108
+ $load_editor = true;
109
+ }
110
+ // Compatibility for WP Pafe Widget plugin
111
+ if (is_plugin_active('wp-page-widget/wp-page-widgets.php') && ( $pagenow == "post-new.php" || $pagenow == "post.php" )) {
112
+ $load_editor = true;
113
+ }
114
+ if ($load_editor) {
115
  add_action( 'admin_head', 'black_studio_tinymce_load_tiny_mce');
116
  add_filter( 'tiny_mce_before_init', 'black_studio_tinymce_init_editor', 20);
117
  add_action( 'admin_print_scripts', 'black_studio_tinymce_scripts');
213
  }
214
  }
215
 
216
+ /* Hack needed to enable full media options when adding content form media library */
217
+ /* (this is done excluding post_id parameter in Thickbox iframe url) */
218
+ add_filter('_upload_iframe_src', 'black_studio_tinymce_upload_iframe_src');
219
+ function black_studio_tinymce_upload_iframe_src ($upload_iframe_src) {
220
+ global $pagenow;
221
+ if ($pagenow == "widgets.php" || ($pagenow == "admin-ajax.php" && isset ($_POST['id_base']) && $_POST['id_base'] == "black-studio-tinymce") ) {
222
+ $upload_iframe_src = str_replace('post_id=0', '', $upload_iframe_src);
223
+ }
224
+ return $upload_iframe_src;
225
+ }
languages/black-studio-tinymce-widget-de_DE.mo ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Black Studio TinyMCE Widget in German
2
+ # This file is distributed under the same license as the Black Studio TinyMCE Widget package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2012-10-03 09:58:45+0000\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: GlotPress/0.1\n"
11
+ "Project-Id-Version: Black Studio TinyMCE Widget\n"
12
+
13
+ #: black-studio-tinymce-widget.php:70
14
+ msgid "HTML"
15
+ msgstr "HTML"
16
+
17
+ #: black-studio-tinymce-widget.php:71
18
+ msgid "Visual"
19
+ msgstr "Visual"
20
+
21
+ #: black-studio-tinymce-widget.php:79
22
+ msgid "Donate"
23
+ msgstr "Spende"
24
+
25
+ #: black-studio-tinymce-widget.php:79
26
+ msgid "Support"
27
+ msgstr "Support"
28
+
29
+ #: black-studio-tinymce-widget.php:79
30
+ msgid "Follow"
31
+ msgstr "Folgen"
32
+
33
+ #: black-studio-tinymce-widget.php:19
34
+ msgid "Arbitrary text or HTML with visual editor"
35
+ msgstr "Normaler Text oder HTML mit Editor"
36
+
37
+ #: black-studio-tinymce-widget.php:21
38
+ msgid "Black Studio TinyMCE"
39
+ msgstr "Black Studio TinyMCE"
languages/black-studio-tinymce-widget-de_DE.po ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Black Studio TinyMCE Widget in German
2
+ # This file is distributed under the same license as the Black Studio TinyMCE Widget package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2012-10-03 09:57:33+0000\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: GlotPress/0.1\n"
11
+ "Project-Id-Version: Black Studio TinyMCE Widget\n"
12
+
13
+ #: black-studio-tinymce-widget.php:70
14
+ msgid "HTML"
15
+ msgstr "HTML"
16
+
17
+ #: black-studio-tinymce-widget.php:71
18
+ msgid "Visual"
19
+ msgstr "Visual"
20
+
21
+ #: black-studio-tinymce-widget.php:79
22
+ msgid "Donate"
23
+ msgstr "Spende"
24
+
25
+ #: black-studio-tinymce-widget.php:79
26
+ msgid "Support"
27
+ msgstr "Support"
28
+
29
+ #: black-studio-tinymce-widget.php:79
30
+ msgid "Follow"
31
+ msgstr "Folgen"
32
+
33
+ #: black-studio-tinymce-widget.php:19
34
+ msgid "Arbitrary text or HTML with visual editor"
35
+ msgstr "Normaler Text oder HTML mit Editor"
36
+
37
+ #: black-studio-tinymce-widget.php:21
38
+ msgid "Black Studio TinyMCE"
39
+ msgstr "Black Studio TinyMCE"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.blackstudio.it/en/wordpress-plugins/black-studio-tinymce
4
  Tags: wysiwyg, widget, tinymce, editor, image, media, rich text, rich text editor, visual editor, wysiwyg editor, tinymce editor, widget editor, html editor, wysiwyg widget, html widget, editor widget, text widget, rich text widget, enhanced text widget, tinymce widget, visual widget, image widget, media widget
5
  Requires at least: 3.0
6
  Tested up to: 3.4
7
- Stable tag: 0.9.5
8
 
9
  Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
10
 
@@ -63,11 +63,20 @@ Please post a message in the [Support forum](http://wordpress.org/support/plugin
63
 
64
  = How to embed video and other contents =
65
 
66
- Wordpress has a nice [autoembed feature](http://codex.wordpress.org/Embeds) that allows you to embed videos in an easy way, by just putting the URL in the content area. This is also possible for widgets created with this plugin, but for best results it is recommended to put the URL in an `[embed]` shortcode. Example: `[embed]http://www.youtube.com/watch?v=XXXXXXXXXXX[/embed]`
67
- Alternatively, if you don't want to use `[embed]` shortcode ensure that your URL is not surrounded by a `<p>` tag, which is added automatically by the WYSIWYG editor (switch to HTML mode to remove `<p>` tags).
68
 
69
  == Changelog ==
70
 
 
 
 
 
 
 
 
 
 
71
  = 0.9.5 =
72
  * Added support for autoembed urls (youtube, etc)
73
 
4
  Tags: wysiwyg, widget, tinymce, editor, image, media, rich text, rich text editor, visual editor, wysiwyg editor, tinymce editor, widget editor, html editor, wysiwyg widget, html widget, editor widget, text widget, rich text widget, enhanced text widget, tinymce widget, visual widget, image widget, media widget
5
  Requires at least: 3.0
6
  Tested up to: 3.4
7
+ Stable tag: 1.0.0
8
 
9
  Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
10
 
63
 
64
  = How to embed video and other contents =
65
 
66
+ Wordpress has a nice [autoembed feature](http://codex.wordpress.org/Embeds) that allows you to embed videos and other stuff in an easy way, by just putting the URL in the content area. This is also possible for widgets created with this plugin, but for best results it is recommended to put the URL inside an `[embed]` shortcode. Example: `[embed]http://www.youtube.com/watch?v=XXXXXXXXXXX[/embed]`. Ensure that the URL has not an hyperlink on it.
67
+ Alternatively, if you don't want to use `[embed]` shortcode, ensure that the URL is not surrounded by a `<p>` tag, which is added automatically by the WYSIWYG editor (switch to HTML mode to remove enclosing `<p>` tags).
68
 
69
  == Changelog ==
70
 
71
+ = 1.0.0 =
72
+ * Added full image options when adding content from media library
73
+ * Added german translation (Contributor: Christian Foellmann)
74
+ * Overall Javascript code optimization
75
+ * Better Javascript compression
76
+ * Fixed editor background color
77
+ * Fixed compatibility issue with "WP Page Widget" plugin
78
+ * Fixed issue about editor partially hidden on narrow screens
79
+
80
  = 0.9.5 =
81
  * Added support for autoembed urls (youtube, etc)
82