Version Description
- Fixed compatibility issue with Wordpress 3.9 Beta 3
- Added support for Wordpress 3.9 Theme Customizer
- Added swedish translation (Contributor: macsolve)
- Updated installation documentation
- Updated FAQ
Download this release
Release Info
Developer | marcochiesi |
Plugin | Black Studio TinyMCE Widget |
Version | 1.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.3.1 to 1.3.2
black-studio-tinymce-widget.dev.js
CHANGED
@@ -23,7 +23,7 @@ var wpActiveEditor;
|
|
23 |
// Deactivate visual editor
|
24 |
function black_studio_deactivate_visual_editor( id ) {
|
25 |
if ( typeof tinyMCE == 'object' && typeof tinyMCE.execCommand == 'function' ) {
|
26 |
-
if (
|
27 |
var content = tinyMCE.get( id ).getContent();
|
28 |
// tinyMCE.execCommand('mceRemoveControl', false, id);
|
29 |
tinyMCE.get( id ).remove();
|
@@ -35,11 +35,11 @@ var wpActiveEditor;
|
|
35 |
function black_studio_open_deferred_activate_visual_editor( id ) {
|
36 |
$( 'div.widget-inside:has(#' + id + ') input[id^=widget-black-studio-tinymce][id$=type][value=visual]' ).each(function() {
|
37 |
// If textarea is visible and animation/ajax has completed (or in accessibility mode) then trigger a click to Visual button and enable the editor
|
38 |
-
if ( $('div.widget:has(#' + id + ') :animated' ).size() == 0 &&
|
39 |
$( 'a[id^=widget-black-studio-tinymce][id$=visual]', $( this ).closest( 'div.widget-inside' ) ).click();
|
40 |
}
|
41 |
// Otherwise wait and retry later (animation ongoing)
|
42 |
-
else if (
|
43 |
setTimeout(function() {
|
44 |
black_studio_open_deferred_activate_visual_editor( id );
|
45 |
id = null;
|
@@ -56,11 +56,11 @@ var wpActiveEditor;
|
|
56 |
function black_studio_ajax_deferred_activate_visual_editor( id ) {
|
57 |
$( 'div.widget-inside:has(#' + id + ') input[id^=widget-black-studio-tinymce][id$=type][value=visual]' ).each(function() {
|
58 |
// If textarea is visible and animation/ajax has completed then trigger a click to Visual button and enable the editor
|
59 |
-
if ( $.active == 0 &&
|
60 |
$( 'a[id^=widget-black-studio-tinymce][id$=visual]', $( this ).closest( 'div.widget-inside' ) ).click();
|
61 |
}
|
62 |
// Otherwise wait and retry later (animation ongoing)
|
63 |
-
else if ( $( 'div.widget:has(#' + id + ') div.widget-inside' ).is( ':visible' ) &&
|
64 |
setTimeout(function() {
|
65 |
black_studio_ajax_deferred_activate_visual_editor( id );
|
66 |
id=null;
|
23 |
// Deactivate visual editor
|
24 |
function black_studio_deactivate_visual_editor( id ) {
|
25 |
if ( typeof tinyMCE == 'object' && typeof tinyMCE.execCommand == 'function' ) {
|
26 |
+
if ( tinyMCE.get( id ) != null && typeof tinyMCE.get( id ).getContent == 'function' ) {
|
27 |
var content = tinyMCE.get( id ).getContent();
|
28 |
// tinyMCE.execCommand('mceRemoveControl', false, id);
|
29 |
tinyMCE.get( id ).remove();
|
35 |
function black_studio_open_deferred_activate_visual_editor( id ) {
|
36 |
$( 'div.widget-inside:has(#' + id + ') input[id^=widget-black-studio-tinymce][id$=type][value=visual]' ).each(function() {
|
37 |
// If textarea is visible and animation/ajax has completed (or in accessibility mode) then trigger a click to Visual button and enable the editor
|
38 |
+
if ( $('div.widget:has(#' + id + ') :animated' ).size() == 0 && tinyMCE.get( id ) != null && $( '#' + id ).is( ':visible' ) ) {
|
39 |
$( 'a[id^=widget-black-studio-tinymce][id$=visual]', $( this ).closest( 'div.widget-inside' ) ).click();
|
40 |
}
|
41 |
// Otherwise wait and retry later (animation ongoing)
|
42 |
+
else if ( tinyMCE.get( id ) != null ) {
|
43 |
setTimeout(function() {
|
44 |
black_studio_open_deferred_activate_visual_editor( id );
|
45 |
id = null;
|
56 |
function black_studio_ajax_deferred_activate_visual_editor( id ) {
|
57 |
$( 'div.widget-inside:has(#' + id + ') input[id^=widget-black-studio-tinymce][id$=type][value=visual]' ).each(function() {
|
58 |
// If textarea is visible and animation/ajax has completed then trigger a click to Visual button and enable the editor
|
59 |
+
if ( $.active == 0 && tinyMCE.get( id ) != null && $( '#' + id ).is( ':visible' ) ) {
|
60 |
$( 'a[id^=widget-black-studio-tinymce][id$=visual]', $( this ).closest( 'div.widget-inside' ) ).click();
|
61 |
}
|
62 |
// Otherwise wait and retry later (animation ongoing)
|
63 |
+
else if ( $( 'div.widget:has(#' + id + ') div.widget-inside' ).is( ':visible' ) && tinyMCE.get( id ) != null ) {
|
64 |
setTimeout(function() {
|
65 |
black_studio_ajax_deferred_activate_visual_editor( id );
|
66 |
id=null;
|
black-studio-tinymce-widget.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var tinyMCEPreInit;var wpActiveEditor;(function(c){function d(g){c("#"+g).addClass("mceEditor");if(typeof tinyMCE=="object"&&typeof tinyMCE.execCommand=="function"){b(g);tinyMCEPreInit.mceInit[g]=tinyMCEPreInit.mceInit["black-studio-tinymce-widget"];tinyMCEPreInit.mceInit[g]["selector"]="#"+g;try{tinymce.init(tinymce.extend({},tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[g]));tinyMCE.execCommand("mceAddControl",false,g)}catch(f){alert(f)}}}function b(g){if(typeof tinyMCE=="object"&&typeof tinyMCE.execCommand=="function"){if(
|
1 |
+
var tinyMCEPreInit;var wpActiveEditor;(function(c){function d(g){c("#"+g).addClass("mceEditor");if(typeof tinyMCE=="object"&&typeof tinyMCE.execCommand=="function"){b(g);tinyMCEPreInit.mceInit[g]=tinyMCEPreInit.mceInit["black-studio-tinymce-widget"];tinyMCEPreInit.mceInit[g]["selector"]="#"+g;try{tinymce.init(tinymce.extend({},tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[g]));tinyMCE.execCommand("mceAddControl",false,g)}catch(f){alert(f)}}}function b(g){if(typeof tinyMCE=="object"&&typeof tinyMCE.execCommand=="function"){if(tinyMCE.get(g)!=null&&typeof tinyMCE.get(g).getContent=="function"){var f=tinyMCE.get(g).getContent();tinyMCE.get(g).remove();c("textarea#"+g).val(f)}}}function a(f){c("div.widget-inside:has(#"+f+") input[id^=widget-black-studio-tinymce][id$=type][value=visual]").each(function(){if(c("div.widget:has(#"+f+") :animated").size()==0&&tinyMCE.get(f)!=null&&c("#"+f).is(":visible")){c("a[id^=widget-black-studio-tinymce][id$=visual]",c(this).closest("div.widget-inside")).click()}else{if(tinyMCE.get(f)!=null){setTimeout(function(){a(f);f=null},100)}else{c("a[id^=widget-black-studio-tinymce][id$=visual]",c(this).closest("div.widget-inside")).click()}}})}function e(f){c("div.widget-inside:has(#"+f+") input[id^=widget-black-studio-tinymce][id$=type][value=visual]").each(function(){if(c.active==0&&tinyMCE.get(f)!=null&&c("#"+f).is(":visible")){c("a[id^=widget-black-studio-tinymce][id$=visual]",c(this).closest("div.widget-inside")).click()}else{if(c("div.widget:has(#"+f+") div.widget-inside").is(":visible")&&tinyMCE.get(f)!=null){setTimeout(function(){e(f);f=null},100)}}})}c(document).ready(function(){c(document).on("click","div.widget:has(textarea[id^=widget-black-studio-tinymce]) .widget-title, div.widget:has(textarea[id^=widget-black-studio-tinymce]) a.widget-action",function(g){var i=c(this).closest("div.widget");var h=c("textarea[id^=widget-black-studio-tinymce]",i);c("input[name=savewidget]",i).on("click",function(j){var l=c(this).closest("div.widget");var k=c("textarea[id^=widget-black-studio-tinymce]",l);if(typeof tinyMCE.get(k.attr("id"))=="object"){b(k.attr("id"))}c(this).unbind("ajaxSuccess").ajaxSuccess(function(n,o,m){var p=c("textarea[id^=widget-black-studio-tinymce]",c(this).closest("div.widget-inside"));e(p.attr("id"))})});c("#wpbody-content").css("overflow","visible");i.css("position","relative").css("z-index","100");a(h.attr("id"));c(".insert-media",i).data("editor",h.attr("id"))});c("div.widget[id*=black-studio-tinymce] input[name=savewidget]").on("click",function(g){var i=c(this).closest("div.widget");var h=c("textarea[id^=widget-black-studio-tinymce]",i);if(typeof tinyMCE.get(h.attr("id"))=="object"){b(h.attr("id"))}c(this).unbind("ajaxSuccess").ajaxSuccess(function(k,l,j){var m=c("textarea[id^=widget-black-studio-tinymce]",c(this).closest("div.widget-inside"));e(m.attr("id"))})});c(document).on("click","a[id^=widget-black-studio-tinymce][id$=visual]",function(g){var h=c(this).closest("div.widget-inside,div.panel-dialog");c("input[id^=widget-black-studio-tinymce][id$=type]",h).val("visual");c(this).addClass("active");c("a[id^=widget-black-studio-tinymce][id$=html]",h).removeClass("active");d(c("textarea[id^=widget-black-studio-tinymce]",h).attr("id"))});c(document).on("click","a[id^=widget-black-studio-tinymce][id$=html]",function(g){var h=c(this).closest("div.widget-inside,div.panel-dialog");c("input[id^=widget-black-studio-tinymce][id$=type]",h).val("html");c(this).addClass("active");c("a[id^=widget-black-studio-tinymce][id$=visual]",h).removeClass("active");b(c("textarea[id^=widget-black-studio-tinymce]",h).attr("id"))});c(document).on("click",".editor_media_buttons a",function(){var g=c(this).closest("div.widget-inside");wpActiveEditor=c("textarea[id^=widget-black-studio-tinymce]",g).attr("id")});if(c("body.widgets_access").size()>0){var f=c("textarea[id^=widget-black-studio-tinymce]");a(f.attr("id"))}})})(jQuery);
|
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: 1.3.
|
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 = "1.3.
|
15 |
$black_studio_tinymce_widget_dev_mode = false;
|
16 |
|
17 |
/* Widget class */
|
@@ -117,7 +117,7 @@ add_action( 'admin_init', 'black_studio_tinymce_admin_init' );
|
|
117 |
function black_studio_tinymce_admin_init() {
|
118 |
global $pagenow;
|
119 |
$load_editor = false;
|
120 |
-
if ( $pagenow == "widgets.php" ) {
|
121 |
$load_editor = true;
|
122 |
}
|
123 |
// Compatibility for WP Page Widget plugin
|
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.3.2
|
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.3.2"; // 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 */
|
117 |
function black_studio_tinymce_admin_init() {
|
118 |
global $pagenow;
|
119 |
$load_editor = false;
|
120 |
+
if ( $pagenow == "widgets.php" || $pagenow == "customize.php" ) {
|
121 |
$load_editor = true;
|
122 |
}
|
123 |
// Compatibility for WP Page Widget plugin
|
languages/black-studio-tinymce-widget-sv_SE.mo
ADDED
Binary file
|
languages/black-studio-tinymce-widget-sv_SE.po
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Black Studio TinyMCE Widget\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2014-01-29 10:47+0100\n"
|
6 |
+
"PO-Revision-Date: 2014-01-29 10:48+0100\n"
|
7 |
+
"Last-Translator: Johan Sölve <johan@montania.se>\n"
|
8 |
+
"Language-Team: Black Studio <info@blackstudio.it>\n"
|
9 |
+
"Language: it_IT\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
17 |
+
"X-Poedit-Basepath: ..\n"
|
18 |
+
"X-Textdomain-Support: yes\n"
|
19 |
+
"X-Generator: Poedit 1.5.7\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ black-studio-tinymce-widget
|
23 |
+
#: black-studio-tinymce-widget.php:21
|
24 |
+
msgid "Arbitrary text or HTML with visual editor"
|
25 |
+
msgstr ""
|
26 |
+
"Godtycklig text eller HTML med visuell redigerare. Black Studio TinyMCE."
|
27 |
+
|
28 |
+
# @ black-studio-tinymce-widget
|
29 |
+
#: black-studio-tinymce-widget.php:23
|
30 |
+
msgid "Black Studio TinyMCE"
|
31 |
+
msgstr "Visuell text"
|
32 |
+
|
33 |
+
# @ default
|
34 |
+
#: black-studio-tinymce-widget.php:82
|
35 |
+
msgid "Title:"
|
36 |
+
msgstr "Titel:"
|
37 |
+
|
38 |
+
# @ default
|
39 |
+
#: black-studio-tinymce-widget.php:85
|
40 |
+
msgid "HTML"
|
41 |
+
msgstr "HTML"
|
42 |
+
|
43 |
+
# @ default
|
44 |
+
#: black-studio-tinymce-widget.php:86
|
45 |
+
msgid "Visual"
|
46 |
+
msgstr "Visuell"
|
47 |
+
|
48 |
+
#: black-studio-tinymce-widget.php:94
|
49 |
+
msgid "Donate"
|
50 |
+
msgstr "Donation"
|
51 |
+
|
52 |
+
#: black-studio-tinymce-widget.php:94
|
53 |
+
msgid "Support"
|
54 |
+
msgstr "Support"
|
55 |
+
|
56 |
+
#: black-studio-tinymce-widget.php:94
|
57 |
+
msgid "Follow"
|
58 |
+
msgstr "Följ"
|
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.9
|
7 |
-
Stable tag: 1.3.
|
8 |
|
9 |
Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
|
10 |
|
@@ -35,7 +35,7 @@ This section describes how to install and use the plugin.
|
|
35 |
1. Install automatically through the `Plugins` menu and `Add New` button (or upload the entire `black-studio-tinymce-widget` folder to the `/wp-content/plugins/` directory)
|
36 |
2. Activate the plugin
|
37 |
3. Go to `Appearance` -> `Widgets`
|
38 |
-
4. Drag and drop the `
|
39 |
5. Fill in title and (rich) text
|
40 |
|
41 |
== Screenshots ==
|
@@ -66,8 +66,19 @@ Please post a message in the [Support forum](http://wordpress.org/support/plugin
|
|
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.3.1 =
|
72 |
* Renamed the widget to "Visual Editor" for better user friendliness
|
73 |
* Fixed compatibility issue with FirmaSite Theme Enhancer plugin
|
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.9
|
7 |
+
Stable tag: 1.3.2
|
8 |
|
9 |
Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
|
10 |
|
35 |
1. Install automatically through the `Plugins` menu and `Add New` button (or upload the entire `black-studio-tinymce-widget` folder to the `/wp-content/plugins/` directory)
|
36 |
2. Activate the plugin
|
37 |
3. Go to `Appearance` -> `Widgets`
|
38 |
+
4. Drag and drop the `Visual Editor` widget to the desired sidebar (or, if using Accesibility mode, click the `Add` link)
|
39 |
5. Fill in title and (rich) text
|
40 |
|
41 |
== Screenshots ==
|
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 |
+
= Widgets disappeared after migrating or changing the site URL =
|
70 |
+
|
71 |
+
When dealing with a WordPress site URL change it is necessary to face the "serialized fields" issue: data may become corrupted if using a simple search/replace (see the [Codex](http://codex.wordpress.org/Moving_WordPress#When_Your_Domain_Name_or_URLs_Change) for further info). This is not an issue specifically related to our plugin, but it affects all the parts (plugins, themes and WordPress core files too) that use serialized data archiviation. When changing the site URL, the recommended way is to use the [Search and Replace for WordPress Databases Script](https://interconnectit.com/products/search-and-replace-for-wordpress-databases/), as suggested by the Codex.
|
72 |
+
|
73 |
== Changelog ==
|
74 |
|
75 |
+
= 1.3.2 =
|
76 |
+
* Fixed compatibility issue with Wordpress 3.9 Beta 3
|
77 |
+
* Added support for Wordpress 3.9 Theme Customizer
|
78 |
+
* Added swedish translation (Contributor: macsolve)
|
79 |
+
* Updated installation documentation
|
80 |
+
* Updated FAQ
|
81 |
+
|
82 |
= 1.3.1 =
|
83 |
* Renamed the widget to "Visual Editor" for better user friendliness
|
84 |
* Fixed compatibility issue with FirmaSite Theme Enhancer plugin
|