Version Description
(2014-10-18) = * Added ability to disable automatic addition of paragraphs when editing (i.e. using TinyMCE Advanced option) * Enhanced real time rendering in theme customizer * Fixed compatibility issue with Page Builder related to comment reply in admin * Fixed compatibility issue with Styles plugin
Download this release
Release Info
Developer | marcochiesi |
Plugin | Black Studio TinyMCE Widget |
Version | 2.1.3 |
Comparing to | |
See all releases |
Code changes from version 2.1.2 to 2.1.3
- black-studio-tinymce-widget.php +3 -3
- css/black-studio-tinymce-widget-pre33.min.css +1 -1
- css/black-studio-tinymce-widget.min.css +1 -1
- includes/class-admin.php +10 -10
- includes/class-compatibility-plugins.php +3 -1
- js/black-studio-tinymce-widget-pointer.min.js +1 -1
- js/black-studio-tinymce-widget-pre33.min.js +1 -1
- js/black-studio-tinymce-widget-pre39.min.js +1 -1
- js/black-studio-tinymce-widget.js +26 -6
- js/black-studio-tinymce-widget.min.js +2 -2
- js/wp-page-widget.min.js +1 -1
- readme.txt +9 -3
black-studio-tinymce-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Black Studio TinyMCE Widget
|
4 |
Plugin URI: https://wordpress.org/plugins/black-studio-tinymce-widget/
|
5 |
Description: Adds a new "Visual Editor" widget type based on the native WordPress TinyMCE editor.
|
6 |
-
Version: 2.1.
|
7 |
Author: Black Studio
|
8 |
Author URI: http://www.blackstudio.it
|
9 |
Requires at least: 3.1
|
@@ -35,7 +35,7 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Plugin' ) ) {
|
|
35 |
* @var string
|
36 |
* @since 2.0.0
|
37 |
*/
|
38 |
-
public static $version = '2.1.
|
39 |
|
40 |
/**
|
41 |
* The single instance of the plugin class
|
@@ -180,7 +180,7 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Plugin' ) ) {
|
|
180 |
self::$text_filters = Black_Studio_TinyMCE_Text_Filters::instance();
|
181 |
}
|
182 |
// Register action and filter hooks
|
183 |
-
add_action( 'plugins_loaded', array( $this, 'load_compatibility' ),
|
184 |
add_action( 'widgets_init', array( $this, 'widgets_init' ) );
|
185 |
}
|
186 |
|
3 |
Plugin Name: Black Studio TinyMCE Widget
|
4 |
Plugin URI: https://wordpress.org/plugins/black-studio-tinymce-widget/
|
5 |
Description: Adds a new "Visual Editor" widget type based on the native WordPress TinyMCE editor.
|
6 |
+
Version: 2.1.3
|
7 |
Author: Black Studio
|
8 |
Author URI: http://www.blackstudio.it
|
9 |
Requires at least: 3.1
|
35 |
* @var string
|
36 |
* @since 2.0.0
|
37 |
*/
|
38 |
+
public static $version = '2.1.3';
|
39 |
|
40 |
/**
|
41 |
* The single instance of the plugin class
|
180 |
self::$text_filters = Black_Studio_TinyMCE_Text_Filters::instance();
|
181 |
}
|
182 |
// Register action and filter hooks
|
183 |
+
add_action( 'plugins_loaded', array( $this, 'load_compatibility' ), 50 );
|
184 |
add_action( 'widgets_init', array( $this, 'widgets_init' ) );
|
185 |
}
|
186 |
|
css/black-studio-tinymce-widget-pre33.min.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/* Black Studio TinyMCE Widget - v2.1.
|
2 |
.bstw-links{font-size:11px;margin-top:-3px;text-align:right;position:absolute;right:18px}.bstw-links .icon-plugins{float:right;padding:3px 6px;margin:-8px -8px 0 -2px;background:url(../../../../wp-admin/images/menu.png) -180px -33px no-repeat;width:16px;height:16px}.bstw-links .bstw-links-list{display:none}.bstw-links a{text-decoration:none}#mce_fullscreen_container{background-color:#fff}#wp-black-studio-tinymce-widget-wrap{display:none}#TB_overlay,#TB_window{z-index:999999}.wp-editor-container{border-style:solid;border-width:1px;border-collapse:separate;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-color:#ccc #ccc #dfdfdf;clear:both}.wp-switch-editor{height:18px;margin:5px 5px 0 0;padding:4px 5px 2px;float:right;cursor:pointer;border-width:1px;border-style:solid;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;background-color:#f1f1f1;border-color:#dfdfdf #dfdfdf #ccc;color:#999;position:relative;top:1px}.html-active .switch-html,.tmce-active .switch-tmce{border-color:#ccc #ccc #e9e9e9;background-color:#e9e9e9;color:#333}.wp-media-buttons{cursor:default;padding:8px 8px 0}.wp-media-buttons a{cursor:pointer;padding:0 0 5px 10px}.wp-media-buttons img{vertical-align:middle}.wp_themeSkin .mceStatusbar{border-color:#dfdfdf}
|
1 |
+
/* Black Studio TinyMCE Widget - v2.1.3 */
|
2 |
.bstw-links{font-size:11px;margin-top:-3px;text-align:right;position:absolute;right:18px}.bstw-links .icon-plugins{float:right;padding:3px 6px;margin:-8px -8px 0 -2px;background:url(../../../../wp-admin/images/menu.png) -180px -33px no-repeat;width:16px;height:16px}.bstw-links .bstw-links-list{display:none}.bstw-links a{text-decoration:none}#mce_fullscreen_container{background-color:#fff}#wp-black-studio-tinymce-widget-wrap{display:none}#TB_overlay,#TB_window{z-index:999999}.wp-editor-container{border-style:solid;border-width:1px;border-collapse:separate;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-color:#ccc #ccc #dfdfdf;clear:both}.wp-switch-editor{height:18px;margin:5px 5px 0 0;padding:4px 5px 2px;float:right;cursor:pointer;border-width:1px;border-style:solid;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;background-color:#f1f1f1;border-color:#dfdfdf #dfdfdf #ccc;color:#999;position:relative;top:1px}.html-active .switch-html,.tmce-active .switch-tmce{border-color:#ccc #ccc #e9e9e9;background-color:#e9e9e9;color:#333}.wp-media-buttons{cursor:default;padding:8px 8px 0}.wp-media-buttons a{cursor:pointer;padding:0 0 5px 10px}.wp-media-buttons img{vertical-align:middle}.wp_themeSkin .mceStatusbar{border-color:#dfdfdf}
|
css/black-studio-tinymce-widget.min.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/* Black Studio TinyMCE Widget - v2.1.
|
2 |
.bstw-links{font-size:11px;margin-top:-3px;text-align:right;position:absolute;right:18px}.rtl .bstw-links{text-align:left;right:auto;left:18px}.bstw-links .icon16:before{padding:0}.bstw-links .icon16{float:right;padding:3px 6px;margin:-6px -8px 0 -2px}.rtl .bstw-links .icon16{float:left;margin:-6px -2px 0 -8px}.bstw-links .bstw-links-list{display:none}.bstw-links a{text-decoration:none}.bstw-loading{position:absolute;left:0;right:0;top:0;bottom:0;background-color:#fff;background-image:url(../../../../wp-admin/images/loading.gif);background-position:center center;background-repeat:no-repeat;z-index:100000;display:none;opacity:.5}#wp-black-studio-tinymce-widget-wrap{display:none}div[id*=black-studio-tinymce] .wp-editor-wrap{margin-bottom:1em}#available-widgets [class*=black-studio-tinymce] .widget-title:before{content:"\f116"}.wp-customizer .mce-floatpanel.mce-popover{z-index:500000!important}div[id*=black-studio-tinymce] .mce-wp-fullscreen{display:none}.ui-dialog.panels-admin-dialog{z-index:100002!important}#TB_overlay,#TB_window{z-index:999999!important}body.wait,body.wait *{cursor:wait!important}#zedity_content_overlay{z-index:100000!important}.mce-rtl .mce-colorbutton button{padding-right:3px!important;padding-left:3px!important}.mce-rtl .mce-colorbutton .mce-preview{margin:0!important;padding:0!important}
|
1 |
+
/* Black Studio TinyMCE Widget - v2.1.3 */
|
2 |
.bstw-links{font-size:11px;margin-top:-3px;text-align:right;position:absolute;right:18px}.rtl .bstw-links{text-align:left;right:auto;left:18px}.bstw-links .icon16:before{padding:0}.bstw-links .icon16{float:right;padding:3px 6px;margin:-6px -8px 0 -2px}.rtl .bstw-links .icon16{float:left;margin:-6px -2px 0 -8px}.bstw-links .bstw-links-list{display:none}.bstw-links a{text-decoration:none}.bstw-loading{position:absolute;left:0;right:0;top:0;bottom:0;background-color:#fff;background-image:url(../../../../wp-admin/images/loading.gif);background-position:center center;background-repeat:no-repeat;z-index:100000;display:none;opacity:.5}#wp-black-studio-tinymce-widget-wrap{display:none}div[id*=black-studio-tinymce] .wp-editor-wrap{margin-bottom:1em}#available-widgets [class*=black-studio-tinymce] .widget-title:before{content:"\f116"}.wp-customizer .mce-floatpanel.mce-popover{z-index:500000!important}div[id*=black-studio-tinymce] .mce-wp-fullscreen{display:none}.ui-dialog.panels-admin-dialog{z-index:100002!important}#TB_overlay,#TB_window{z-index:999999!important}body.wait,body.wait *{cursor:wait!important}#zedity_content_overlay{z-index:100000!important}.mce-rtl .mce-colorbutton button{padding-right:3px!important;padding-left:3px!important}.mce-rtl .mce-colorbutton .mce-preview{margin:0!important;padding:0!important}
|
includes/class-admin.php
CHANGED
@@ -121,8 +121,8 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Admin' ) ) {
|
|
121 |
add_action( 'admin_print_footer_scripts', array( $this, 'admin_print_footer_scripts' ) );
|
122 |
add_action( 'black_studio_tinymce_editor', array( $this, 'editor' ), 10, 3 );
|
123 |
add_action( 'black_studio_tinymce_before_editor', array( $this, 'display_links' ) ); // consider donating if you remove links
|
124 |
-
add_filter( 'wp_editor_settings', array( $this, 'editor_settings' ),
|
125 |
-
add_filter( 'tiny_mce_before_init', array( $this, 'tinymce_fix_rtl' ), 10
|
126 |
add_filter( 'tiny_mce_before_init', array( $this, 'tinymce_fullscreen' ), 10, 2 );
|
127 |
add_filter( 'quicktags_settings', array( $this, 'quicktags_fullscreen' ), 10, 2 );
|
128 |
do_action( 'black_studio_tinymce_load' );
|
@@ -270,7 +270,7 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Admin' ) ) {
|
|
270 |
* @since 2.0.0
|
271 |
*/
|
272 |
public function editor( $text, $editor_id, $name = '' ) {
|
273 |
-
wp_editor( $text, $editor_id,
|
274 |
}
|
275 |
|
276 |
/**
|
@@ -378,7 +378,7 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Admin' ) ) {
|
|
378 |
* @return mixed[]
|
379 |
* @since 2.1.0
|
380 |
*/
|
381 |
-
public function tinymce_fix_rtl( $settings
|
382 |
// This fix has to be applied to all editor instances (not just BSTW ones)
|
383 |
if ( is_rtl() && isset( $settings['plugins'] ) && ',directionality' == $settings['plugins'] ) {
|
384 |
unset( $settings['plugins'] );
|
@@ -389,17 +389,17 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Admin' ) ) {
|
|
389 |
/**
|
390 |
* Apply TinyMCE default fullscreen
|
391 |
*
|
392 |
-
* @param
|
393 |
* @param string $editor_id
|
394 |
-
* @return
|
395 |
* @since 2.1.2
|
396 |
*/
|
397 |
public function tinymce_fullscreen( $settings, $editor_id ) {
|
398 |
if ( strstr( $editor_id, 'black-studio-tinymce' ) ) {
|
399 |
-
for( $i = 1; $i <= 4; $i++ ) {
|
400 |
$toolbar = 'toolbar' . $i;
|
401 |
if ( isset( $settings[ $toolbar ] ) ) {
|
402 |
-
|
403 |
}
|
404 |
}
|
405 |
}
|
@@ -409,9 +409,9 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Admin' ) ) {
|
|
409 |
/**
|
410 |
* Disable Quicktags default fullscreen
|
411 |
*
|
412 |
-
* @param
|
413 |
* @param string $editor_id
|
414 |
-
* @return
|
415 |
* @since 2.1.2
|
416 |
*/
|
417 |
public function quicktags_fullscreen( $settings, $editor_id ) {
|
121 |
add_action( 'admin_print_footer_scripts', array( $this, 'admin_print_footer_scripts' ) );
|
122 |
add_action( 'black_studio_tinymce_editor', array( $this, 'editor' ), 10, 3 );
|
123 |
add_action( 'black_studio_tinymce_before_editor', array( $this, 'display_links' ) ); // consider donating if you remove links
|
124 |
+
add_filter( 'wp_editor_settings', array( $this, 'editor_settings' ), 5, 2 );
|
125 |
+
add_filter( 'tiny_mce_before_init', array( $this, 'tinymce_fix_rtl' ), 10 );
|
126 |
add_filter( 'tiny_mce_before_init', array( $this, 'tinymce_fullscreen' ), 10, 2 );
|
127 |
add_filter( 'quicktags_settings', array( $this, 'quicktags_fullscreen' ), 10, 2 );
|
128 |
do_action( 'black_studio_tinymce_load' );
|
270 |
* @since 2.0.0
|
271 |
*/
|
272 |
public function editor( $text, $editor_id, $name = '' ) {
|
273 |
+
wp_editor( $text, $editor_id, array( 'textarea_name' => $name ) );
|
274 |
}
|
275 |
|
276 |
/**
|
378 |
* @return mixed[]
|
379 |
* @since 2.1.0
|
380 |
*/
|
381 |
+
public function tinymce_fix_rtl( $settings ) {
|
382 |
// This fix has to be applied to all editor instances (not just BSTW ones)
|
383 |
if ( is_rtl() && isset( $settings['plugins'] ) && ',directionality' == $settings['plugins'] ) {
|
384 |
unset( $settings['plugins'] );
|
389 |
/**
|
390 |
* Apply TinyMCE default fullscreen
|
391 |
*
|
392 |
+
* @param mixed[] $settings
|
393 |
* @param string $editor_id
|
394 |
+
* @return mixed[]
|
395 |
* @since 2.1.2
|
396 |
*/
|
397 |
public function tinymce_fullscreen( $settings, $editor_id ) {
|
398 |
if ( strstr( $editor_id, 'black-studio-tinymce' ) ) {
|
399 |
+
for ( $i = 1; $i <= 4; $i++ ) {
|
400 |
$toolbar = 'toolbar' . $i;
|
401 |
if ( isset( $settings[ $toolbar ] ) ) {
|
402 |
+
$settings[ $toolbar ] = str_replace( 'wp_fullscreen', 'wp_fullscreen,fullscreen', $settings[ $toolbar ] );
|
403 |
}
|
404 |
}
|
405 |
}
|
409 |
/**
|
410 |
* Disable Quicktags default fullscreen
|
411 |
*
|
412 |
+
* @param mixed[] $settings
|
413 |
* @param string $editor_id
|
414 |
+
* @return mixed[]
|
415 |
* @since 2.1.2
|
416 |
*/
|
417 |
public function quicktags_fullscreen( $settings, $editor_id ) {
|
includes/class-compatibility-plugins.php
CHANGED
@@ -299,7 +299,9 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Compatibility_Plugins' ) ) {
|
|
299 |
public function siteorigin_panels_editor_settings( $settings, $editor_id ) {
|
300 |
// Allow initialization of main page/post editor instances
|
301 |
if ( strstr( $editor_id, 'black-studio-tinymce' ) === false ) {
|
302 |
-
$settings['tinymce']
|
|
|
|
|
303 |
}
|
304 |
// Prevent wpautop on editor instances inside Page Builder
|
305 |
if ( $editor_id == 'widget-black-studio-tinymce-{$id}-text' ) {
|
299 |
public function siteorigin_panels_editor_settings( $settings, $editor_id ) {
|
300 |
// Allow initialization of main page/post editor instances
|
301 |
if ( strstr( $editor_id, 'black-studio-tinymce' ) === false ) {
|
302 |
+
if ( ! empty( $settings['tinymce'] ) ) {
|
303 |
+
$settings['tinymce']['wp_skip_init'] = false ;
|
304 |
+
}
|
305 |
}
|
306 |
// Prevent wpautop on editor instances inside Page Builder
|
307 |
if ( $editor_id == 'widget-black-studio-tinymce-{$id}-text' ) {
|
js/black-studio-tinymce-widget-pointer.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/* Black Studio TinyMCE Widget - v2.1.
|
2 |
jQuery(document).ready(function(a){function b(b){var c=bstw_pointers.pointers[b],d=a.extend(c.options,{close:function(){a.post(ajaxurl,{pointer:c.pointer_id,action:"dismiss-wp-pointer"})}});a(c.target).pointer(d).pointer("open")}b(0)});
|
1 |
+
/* Black Studio TinyMCE Widget - v2.1.3 */
|
2 |
jQuery(document).ready(function(a){function b(b){var c=bstw_pointers.pointers[b],d=a.extend(c.options,{close:function(){a.post(ajaxurl,{pointer:c.pointer_id,action:"dismiss-wp-pointer"})}});a(c.target).pointer(d).pointer("open")}b(0)});
|
js/black-studio-tinymce-widget-pre33.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/* Black Studio TinyMCE Widget - v2.1.
|
2 |
!function(a){function b(c){var d=null;return"string"==typeof c?d=c:"object"==typeof c&&c instanceof jQuery&&(d=a("textarea[id^=widget-black-studio-tinymce]",c.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(a("#"+d).addClass("mceEditor"),"object"==typeof tinymce&&"function"==typeof tinymce.execCommand){this.deactivate();try{tinymce.execCommand("mceAddControl",!1,d)}catch(b){window.alert(b)}}return this},deactivate:function(){if("object"==typeof tinymce&&"function"==typeof tinymce.execCommand&&this.is_tinymce_active()){var b=tinymce.get(d).getContent();tinymce.get(d).remove(),a("#"+d).val(b)}return this},activate_after_open:function(){return"visual"===this.get_mode()&&(0===a("div.widget:has(#"+d+") :animated").size()&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_tinymce_active()?this.set_mode("visual"):setTimeout(function(){b(d).activate_after_open()},100)),this},activate_after_ajax:function(){return"visual"===this.get_mode()&&(0===a.active&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_widget_inside_visible()&&!this.is_tinymce_active()&&setTimeout(function(){b(d).activate_after_ajax()},100)),this},get_widget:function(){return a("#"+d).closest("div.widget")},get_widget_inside:function(){return a("#"+d).closest("div.widget-inside")},get_editor_wrap:function(){return a("#"+d).closest("div.wp-editor-wrap")},get_textarea:function(){return a("#"+d)},get_id:function(){return d},get_tinymce:function(){return tinymce.get(d)},get_mode:function(){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val()},set_mode:function(b){return"visual"===b&&(this.get_editor_wrap().removeClass("html-active").addClass("tmce-active"),this.activate()),"html"===b&&(this.get_editor_wrap().removeClass("tmce-active").addClass("html-active"),this.deactivate()),a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val(b),this},is_tinymce_active:function(){return"object"==typeof tinymce&&"object"==typeof tinymce.get(d)&&null!==tinymce.get(d)},is_textearea_visible:function(){return a("#"+d).is(":visible")},is_widget_inside_visible:function(){return a(" div.widget-inside:has(#"+d+")").is(":visible")},check_duplicates:function(){return a('[name="'+this.get_textarea().attr("name")+'"]').size()>1&&0===a("div.error",this.get_widget_inside()).length&&this.get_widget_inside().prepend('<div class="error"><strong>'+bstw_data.error_duplicate_id+"</strong></div>"),this},fix_css:function(){return this.get_widget().css("position","relative").css("z-index","100000"),a("#wpbody-content").css("overflow","visible"),this},set_media_target:function(){return a(".insert-media",this.get_widget()).data("editor",d),this}}}a(document).ready(function(){a("div.widget[id*=black-studio-tinymce] .widget-title, div.widget[id*=black-studio-tinymce] a.widget-action").live("click",function(){b(a(this)).check_duplicates().fix_css().set_media_target().activate_after_open(),a("input[name=savewidget]",b(a(this)).get_widget()).click(function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})})}),a("div.widget[id*=black-studio-tinymce] input[name=savewidget]").live("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),a("a[id^=widget-black-studio-tinymce][id$=tmce]").live("click",function(){b(a(this)).set_mode("visual")}),a("a[id^=widget-black-studio-tinymce][id$=html]").live("click",function(){b(a(this)).set_mode("html")}),a(".wp-media-buttons a").live("click",function(){edCanvas=b(a(this)).get_textarea().get(),wpActiveEditor=b(a(this)).get_id()}),a("body.widgets_access").size()>0&&b(a("textarea[id^=widget-black-studio-tinymce]").attr("id")).activate_after_open(),a(".bstw-links-icon").live("click",function(b){b.preventDefault(),a(this).closest(".bstw-links").children(".bstw-links-list").toggle()})})}(jQuery);
|
1 |
+
/* Black Studio TinyMCE Widget - v2.1.3 */
|
2 |
!function(a){function b(c){var d=null;return"string"==typeof c?d=c:"object"==typeof c&&c instanceof jQuery&&(d=a("textarea[id^=widget-black-studio-tinymce]",c.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(a("#"+d).addClass("mceEditor"),"object"==typeof tinymce&&"function"==typeof tinymce.execCommand){this.deactivate();try{tinymce.execCommand("mceAddControl",!1,d)}catch(b){window.alert(b)}}return this},deactivate:function(){if("object"==typeof tinymce&&"function"==typeof tinymce.execCommand&&this.is_tinymce_active()){var b=tinymce.get(d).getContent();tinymce.get(d).remove(),a("#"+d).val(b)}return this},activate_after_open:function(){return"visual"===this.get_mode()&&(0===a("div.widget:has(#"+d+") :animated").size()&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_tinymce_active()?this.set_mode("visual"):setTimeout(function(){b(d).activate_after_open()},100)),this},activate_after_ajax:function(){return"visual"===this.get_mode()&&(0===a.active&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_widget_inside_visible()&&!this.is_tinymce_active()&&setTimeout(function(){b(d).activate_after_ajax()},100)),this},get_widget:function(){return a("#"+d).closest("div.widget")},get_widget_inside:function(){return a("#"+d).closest("div.widget-inside")},get_editor_wrap:function(){return a("#"+d).closest("div.wp-editor-wrap")},get_textarea:function(){return a("#"+d)},get_id:function(){return d},get_tinymce:function(){return tinymce.get(d)},get_mode:function(){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val()},set_mode:function(b){return"visual"===b&&(this.get_editor_wrap().removeClass("html-active").addClass("tmce-active"),this.activate()),"html"===b&&(this.get_editor_wrap().removeClass("tmce-active").addClass("html-active"),this.deactivate()),a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val(b),this},is_tinymce_active:function(){return"object"==typeof tinymce&&"object"==typeof tinymce.get(d)&&null!==tinymce.get(d)},is_textearea_visible:function(){return a("#"+d).is(":visible")},is_widget_inside_visible:function(){return a(" div.widget-inside:has(#"+d+")").is(":visible")},check_duplicates:function(){return a('[name="'+this.get_textarea().attr("name")+'"]').size()>1&&0===a("div.error",this.get_widget_inside()).length&&this.get_widget_inside().prepend('<div class="error"><strong>'+bstw_data.error_duplicate_id+"</strong></div>"),this},fix_css:function(){return this.get_widget().css("position","relative").css("z-index","100000"),a("#wpbody-content").css("overflow","visible"),this},set_media_target:function(){return a(".insert-media",this.get_widget()).data("editor",d),this}}}a(document).ready(function(){a("div.widget[id*=black-studio-tinymce] .widget-title, div.widget[id*=black-studio-tinymce] a.widget-action").live("click",function(){b(a(this)).check_duplicates().fix_css().set_media_target().activate_after_open(),a("input[name=savewidget]",b(a(this)).get_widget()).click(function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})})}),a("div.widget[id*=black-studio-tinymce] input[name=savewidget]").live("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),a("a[id^=widget-black-studio-tinymce][id$=tmce]").live("click",function(){b(a(this)).set_mode("visual")}),a("a[id^=widget-black-studio-tinymce][id$=html]").live("click",function(){b(a(this)).set_mode("html")}),a(".wp-media-buttons a").live("click",function(){edCanvas=b(a(this)).get_textarea().get(),wpActiveEditor=b(a(this)).get_id()}),a("body.widgets_access").size()>0&&b(a("textarea[id^=widget-black-studio-tinymce]").attr("id")).activate_after_open(),a(".bstw-links-icon").live("click",function(b){b.preventDefault(),a(this).closest(".bstw-links").children(".bstw-links-list").toggle()})})}(jQuery);
|
js/black-studio-tinymce-widget-pre39.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/* Black Studio TinyMCE Widget - v2.1.
|
2 |
!function(a){function b(c){var d=null;return"string"==typeof c?d=c:"object"==typeof c&&c instanceof jQuery&&(d=a("textarea[id^=widget-black-studio-tinymce]",c.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(a("#"+d).addClass("mceEditor"),"object"==typeof tinymce&&"function"==typeof tinymce.execCommand){this.deactivate(),tinyMCEPreInit.mceInit[d]=tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[d].selector="#"+d;try{tinymce.init(tinymce.extend({},tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[d])),tinymce.execCommand("mceAddControl",!1,d)}catch(b){window.alert(b)}this.is_tinymce_active()&&"function"==typeof tinymce.get(d).on&&tinymce.get(d).on("keyup change",function(){var b=tinymce.get(d).getContent();a("#"+d).val(b).change()})}return this},deactivate:function(){if("object"==typeof tinymce&&"function"==typeof tinymce.execCommand&&this.is_tinymce_active()){var b=tinymce.get(d).getContent();tinymce.get(d).remove(),a("#"+d).val(b)}return this},activate_after_open:function(){return"visual"===this.get_mode()&&(0===a("div.widget:has(#"+d+") :animated").size()&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_tinymce_active()?this.set_mode("visual"):setTimeout(function(){b(d).activate_after_open()},100)),this},activate_after_ajax:function(){return"visual"===this.get_mode()&&(0===a.active&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_widget_inside_visible()&&!this.is_tinymce_active()&&setTimeout(function(){b(d).activate_after_ajax()},100)),this},get_widget:function(){return a("#"+d).closest("div.widget")},get_widget_inside:function(){return a("#"+d).closest("div.widget-inside")},get_editor_wrap:function(){return a("#"+d).closest("div.wp-editor-wrap")},get_textarea:function(){return a("#"+d)},get_id:function(){return d},get_tinymce:function(){return tinymce.get(d)},get_mode:function(){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val()},set_mode:function(b){return"visual"===b&&(this.get_editor_wrap().removeClass("html-active").addClass("tmce-active"),this.activate()),"html"===b&&(this.get_editor_wrap().removeClass("tmce-active").addClass("html-active"),this.deactivate()),a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val(b),this},is_tinymce_active:function(){return"object"==typeof tinymce&&"object"==typeof tinymce.get(d)&&null!==tinymce.get(d)},is_textearea_visible:function(){return a("#"+d).is(":visible")},is_widget_inside_visible:function(){return a(" div.widget-inside:has(#"+d+")").is(":visible")},check_duplicates:function(){return a('[name="'+this.get_textarea().attr("name")+'"]').size()>1&&0===a("div.error",this.get_widget_inside()).length&&this.get_widget_inside().prepend('<div class="error"><strong>'+bstw_data.error_duplicate_id+"</strong></div>"),this},fix_css:function(){return this.get_widget().css("position","relative").css("z-index","100000"),a("#wpbody-content").css("overflow","visible"),this},set_media_target:function(){return a(".insert-media",this.get_widget()).data("editor",d),this}}}a(document).ready(function(){a(document).on("click","div.widget[id*=black-studio-tinymce] .widget-title, div.widget[id*=black-studio-tinymce] a.widget-action",function(){if(b(a(this)).check_duplicates().fix_css().set_media_target().activate_after_open(),a("input[name=savewidget]",b(a(this)).get_widget()).on("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),!a(this).parents("#available-widgets").length){var c,d=parseInt(a("input[name=widget-width]",b(a(this)).get_widget()).val(),10),e=a(window).width(),f=b(a(this)).get_widget().parent().width(),g=parseInt(a("#wpcontent").css("margin-left"),10),h=!("undefined"==typeof isRtl||!isRtl);d+g+30>e&&(c=b(a(this)).get_widget().closest("div.widget-liquid-right").length?h?"margin-right":"margin-left":h?"margin-left":"margin-right",a(b(a(this)).get_widget()).css(c,f-(e-30-g)+"px"))}}),a("div.widget[id*=black-studio-tinymce] input[name=savewidget]").on("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=tmce]",function(){b(a(this)).set_mode("visual")}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=html]",function(){b(a(this)).set_mode("html")}),a(document).on("widget-added",function(a,c){c.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),b(c).activate_after_open())}),a(document).on("click",".wp-media-buttons a",function(){window.wpActiveEditor=b(a(this)).get_id()}),a("body.widgets_access").size()>0&&b(a("textarea[id^=widget-black-studio-tinymce]").attr("id")).activate_after_open(),a(document).on("click",".bstw-links-icon",function(b){b.preventDefault(),a(this).closest(".bstw-links").children(".bstw-links-list").toggle()})})}(jQuery);
|
1 |
+
/* Black Studio TinyMCE Widget - v2.1.3 */
|
2 |
!function(a){function b(c){var d=null;return"string"==typeof c?d=c:"object"==typeof c&&c instanceof jQuery&&(d=a("textarea[id^=widget-black-studio-tinymce]",c.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(a("#"+d).addClass("mceEditor"),"object"==typeof tinymce&&"function"==typeof tinymce.execCommand){this.deactivate(),tinyMCEPreInit.mceInit[d]=tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[d].selector="#"+d;try{tinymce.init(tinymce.extend({},tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[d])),tinymce.execCommand("mceAddControl",!1,d)}catch(b){window.alert(b)}this.is_tinymce_active()&&"function"==typeof tinymce.get(d).on&&tinymce.get(d).on("keyup change",function(){var b=tinymce.get(d).getContent();a("#"+d).val(b).change()})}return this},deactivate:function(){if("object"==typeof tinymce&&"function"==typeof tinymce.execCommand&&this.is_tinymce_active()){var b=tinymce.get(d).getContent();tinymce.get(d).remove(),a("#"+d).val(b)}return this},activate_after_open:function(){return"visual"===this.get_mode()&&(0===a("div.widget:has(#"+d+") :animated").size()&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_tinymce_active()?this.set_mode("visual"):setTimeout(function(){b(d).activate_after_open()},100)),this},activate_after_ajax:function(){return"visual"===this.get_mode()&&(0===a.active&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_widget_inside_visible()&&!this.is_tinymce_active()&&setTimeout(function(){b(d).activate_after_ajax()},100)),this},get_widget:function(){return a("#"+d).closest("div.widget")},get_widget_inside:function(){return a("#"+d).closest("div.widget-inside")},get_editor_wrap:function(){return a("#"+d).closest("div.wp-editor-wrap")},get_textarea:function(){return a("#"+d)},get_id:function(){return d},get_tinymce:function(){return tinymce.get(d)},get_mode:function(){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val()},set_mode:function(b){return"visual"===b&&(this.get_editor_wrap().removeClass("html-active").addClass("tmce-active"),this.activate()),"html"===b&&(this.get_editor_wrap().removeClass("tmce-active").addClass("html-active"),this.deactivate()),a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val(b),this},is_tinymce_active:function(){return"object"==typeof tinymce&&"object"==typeof tinymce.get(d)&&null!==tinymce.get(d)},is_textearea_visible:function(){return a("#"+d).is(":visible")},is_widget_inside_visible:function(){return a(" div.widget-inside:has(#"+d+")").is(":visible")},check_duplicates:function(){return a('[name="'+this.get_textarea().attr("name")+'"]').size()>1&&0===a("div.error",this.get_widget_inside()).length&&this.get_widget_inside().prepend('<div class="error"><strong>'+bstw_data.error_duplicate_id+"</strong></div>"),this},fix_css:function(){return this.get_widget().css("position","relative").css("z-index","100000"),a("#wpbody-content").css("overflow","visible"),this},set_media_target:function(){return a(".insert-media",this.get_widget()).data("editor",d),this}}}a(document).ready(function(){a(document).on("click","div.widget[id*=black-studio-tinymce] .widget-title, div.widget[id*=black-studio-tinymce] a.widget-action",function(){if(b(a(this)).check_duplicates().fix_css().set_media_target().activate_after_open(),a("input[name=savewidget]",b(a(this)).get_widget()).on("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),!a(this).parents("#available-widgets").length){var c,d=parseInt(a("input[name=widget-width]",b(a(this)).get_widget()).val(),10),e=a(window).width(),f=b(a(this)).get_widget().parent().width(),g=parseInt(a("#wpcontent").css("margin-left"),10),h=!("undefined"==typeof isRtl||!isRtl);d+g+30>e&&(c=b(a(this)).get_widget().closest("div.widget-liquid-right").length?h?"margin-right":"margin-left":h?"margin-left":"margin-right",a(b(a(this)).get_widget()).css(c,f-(e-30-g)+"px"))}}),a("div.widget[id*=black-studio-tinymce] input[name=savewidget]").on("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=tmce]",function(){b(a(this)).set_mode("visual")}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=html]",function(){b(a(this)).set_mode("html")}),a(document).on("widget-added",function(a,c){c.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),b(c).activate_after_open())}),a(document).on("click",".wp-media-buttons a",function(){window.wpActiveEditor=b(a(this)).get_id()}),a("body.widgets_access").size()>0&&b(a("textarea[id^=widget-black-studio-tinymce]").attr("id")).activate_after_open(),a(document).on("click",".bstw-links-icon",function(b){b.preventDefault(),a(this).closest(".bstw-links").children(".bstw-links-list").toggle()})})}(jQuery);
|
js/black-studio-tinymce-widget.js
CHANGED
@@ -46,12 +46,13 @@ var bstw;
|
|
46 |
tinyMCEPreInit.mceInit[id].selector = '#' + id;
|
47 |
}
|
48 |
if ( ! this.is_tinymce_active() ) {
|
49 |
-
tinyMCEPreInit.mceInit[id].wpautop = true;
|
50 |
tinyMCEPreInit.mceInit[id].setup = function( ed ) {
|
51 |
// Real time preview (Theme customizer)
|
52 |
ed.on( 'keyup change', function() {
|
53 |
-
|
54 |
-
|
|
|
|
|
55 |
});
|
56 |
$( '#' + id ).addClass( 'active' ).removeClass( 'activating' );
|
57 |
};
|
@@ -88,10 +89,19 @@ var bstw;
|
|
88 |
|
89 |
// Update textarea content when in visual mode
|
90 |
update_content: function() {
|
|
|
91 |
if ( this.get_mode() === 'visual' ) {
|
92 |
-
|
|
|
|
|
|
|
|
|
93 |
} else {
|
94 |
-
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
return this;
|
97 |
},
|
@@ -227,7 +237,17 @@ var bstw;
|
|
227 |
bstw( $widget ).deactivate().activate();
|
228 |
}
|
229 |
});
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
// Event handler for visual switch button
|
232 |
$( document ).on( 'click', 'a[id^=widget-black-studio-tinymce][id$=tmce]', function() {
|
233 |
bstw( $( this ) ).set_mode( 'visual' );
|
46 |
tinyMCEPreInit.mceInit[id].selector = '#' + id;
|
47 |
}
|
48 |
if ( ! this.is_tinymce_active() ) {
|
|
|
49 |
tinyMCEPreInit.mceInit[id].setup = function( ed ) {
|
50 |
// Real time preview (Theme customizer)
|
51 |
ed.on( 'keyup change', function() {
|
52 |
+
if ( bstw( id ).get_mode() === 'visual' ) {
|
53 |
+
bstw( id ).update_content();
|
54 |
+
}
|
55 |
+
$( '#' + id ).change();
|
56 |
});
|
57 |
$( '#' + id ).addClass( 'active' ).removeClass( 'activating' );
|
58 |
};
|
89 |
|
90 |
// Update textarea content when in visual mode
|
91 |
update_content: function() {
|
92 |
+
var content;
|
93 |
if ( this.get_mode() === 'visual' ) {
|
94 |
+
content = tinymce.get( id ).save();
|
95 |
+
if ( tinyMCEPreInit.mceInit[id].wpautop ) {
|
96 |
+
content = window.switchEditors.pre_wpautop( content );
|
97 |
+
}
|
98 |
+
this.get_textarea().val( content);
|
99 |
} else {
|
100 |
+
content = this.get_textarea().val();
|
101 |
+
if ( tinyMCEPreInit.mceInit[id].wpautop ) {
|
102 |
+
content = window.switchEditors.wpautop( );
|
103 |
+
}
|
104 |
+
tinymce.get( id ).setContent( content );
|
105 |
}
|
106 |
return this;
|
107 |
},
|
237 |
bstw( $widget ).deactivate().activate();
|
238 |
}
|
239 |
});
|
240 |
+
|
241 |
+
// Event handler for widget synced
|
242 |
+
$( document ).on( 'widget-synced', function( event, $widget ) {
|
243 |
+
if ( $widget.is( '[id*=black-studio-tinymce]' ) ) {
|
244 |
+
event.preventDefault();
|
245 |
+
if ( bstw( $widget ).get_mode() === 'visual' ) {
|
246 |
+
bstw( $widget ).update_content();
|
247 |
+
}
|
248 |
+
}
|
249 |
+
});
|
250 |
+
|
251 |
// Event handler for visual switch button
|
252 |
$( document ).on( 'click', 'a[id^=widget-black-studio-tinymce][id$=tmce]', function() {
|
253 |
bstw( $( this ) ).set_mode( 'visual' );
|
js/black-studio-tinymce-widget.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/* Black Studio TinyMCE Widget - v2.1.
|
2 |
-
var bstw;!function(a){bstw=function(b){var c=null;return"string"==typeof b?c=b:"object"==typeof b&&b instanceof jQuery&&(c=a("textarea[id^=widget-black-studio-tinymce][id$=text]",b.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(!a("#"+c).hasClass("active")&&!a("#"+c).hasClass("activating")){if(a("#"+c).addClass("activating"),this.is_quicktags_configured()||(tinyMCEPreInit.qtInit[c]=tinyMCEPreInit.qtInit["black-studio-tinymce-widget"],tinyMCEPreInit.qtInit[c].id=c),!this.is_quicktags_active()){var b,d;b=QTags.instances,QTags.instances=[],quicktags(tinyMCEPreInit.qtInit[c]),QTags._buttonsInit(),d=QTags.instances[c],QTags.instances=b,QTags.instances[c]=d}this.is_tinymce_configured()||(tinyMCEPreInit.mceInit[c]=tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[c].selector="#"+c),this.is_tinymce_active()?a("#"+c).addClass("active").removeClass("activating"):(tinyMCEPreInit.mceInit[c].
|
1 |
+
/* Black Studio TinyMCE Widget - v2.1.3 */
|
2 |
+
var bstw;!function(a){bstw=function(b){var c=null;return"string"==typeof b?c=b:"object"==typeof b&&b instanceof jQuery&&(c=a("textarea[id^=widget-black-studio-tinymce][id$=text]",b.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(!a("#"+c).hasClass("active")&&!a("#"+c).hasClass("activating")){if(a("#"+c).addClass("activating"),this.is_quicktags_configured()||(tinyMCEPreInit.qtInit[c]=tinyMCEPreInit.qtInit["black-studio-tinymce-widget"],tinyMCEPreInit.qtInit[c].id=c),!this.is_quicktags_active()){var b,d;b=QTags.instances,QTags.instances=[],quicktags(tinyMCEPreInit.qtInit[c]),QTags._buttonsInit(),d=QTags.instances[c],QTags.instances=b,QTags.instances[c]=d}this.is_tinymce_configured()||(tinyMCEPreInit.mceInit[c]=tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[c].selector="#"+c),this.is_tinymce_active()?a("#"+c).addClass("active").removeClass("activating"):(tinyMCEPreInit.mceInit[c].setup=function(b){b.on("keyup change",function(){"visual"===bstw(c).get_mode()&&bstw(c).update_content(),a("#"+c).change()}),a("#"+c).addClass("active").removeClass("activating")},this.go())}return this},deactivate:function(){return a("#"+c).hasClass("activating")||(this.is_tinymce_active()&&(this.update_content(),tinymce.get(c).remove()),this.is_tinymce_configured()&&delete tinyMCEPreInit.mceInit[c],this.is_quicktags_active()&&(a(".quicktags-toolbar",this.get_widget_inside()).remove(),delete QTags.instances[c]),this.is_quicktags_configured()&&delete tinyMCEPreInit.qtInit[c],a("#"+c).removeClass("active")),this},update_content:function(){var a;return"visual"===this.get_mode()?(a=tinymce.get(c).save(),tinyMCEPreInit.mceInit[c].wpautop&&(a=window.switchEditors.pre_wpautop(a)),this.get_textarea().val(a)):(a=this.get_textarea().val(),tinyMCEPreInit.mceInit[c].wpautop&&(a=window.switchEditors.wpautop()),tinymce.get(c).setContent(a)),this},go:function(a){return"undefined"==typeof a&&(a=this.get_mode()),window.switchEditors.go(c,"visual"===a?"tmce":"html"),this},get_mode:function(){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_container()).val()},set_mode:function(b){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_container()).val(b),this},get_container:function(){return a("#"+c).closest(bstw_data.container_selectors)},get_widget:function(){return a("#"+c).closest("div.widget")},get_widget_inside:function(){return a("#"+c).closest("div.widget-inside")},get_textarea:function(){return a("#"+c)},is_tinymce_active:function(){return"object"==typeof tinymce&&"object"==typeof tinymce.get(c)&&null!==tinymce.get(c)},is_tinymce_configured:function(){return"undefined"!=typeof tinyMCEPreInit.mceInit[c]},is_quicktags_active:function(){return"object"==typeof QTags.instances[c]},is_quicktags_configured:function(){return"object"==typeof tinyMCEPreInit.qtInit[c]},prepare:function(){return a('[name="'+this.get_textarea().attr("name")+'"]').size()>1&&0===a("div.error",this.get_widget_inside()).length&&this.get_widget_inside().prepend('<div class="error"><strong>'+bstw_data.error_duplicate_id+"</strong></div>"),this.get_widget().css("position","relative").css("z-index","100000"),a("#wpbody-content").css("overflow","visible"),this},responsive:function(){if(this.get_widget_inside().is(":visible")){var b,c=parseInt(a("input[name=widget-width]",this.get_widget()).val(),10),d=a(window).width(),e=this.get_widget().parent().width(),f=parseInt(a("#wpcontent").css("margin-left"),10),g=!("undefined"==typeof isRtl||!isRtl);c+f+30>d&&(b=this.get_widget().closest("div.widget-liquid-right").length?g?"margin-right":"margin-left":g?"margin-left":"margin-right",this.get_widget().css(b,e-(d-30-f)+"px"))}return this}}},a(document).ready(function(){a(document).on("click","div.widget[id*=black-studio-tinymce] .widget-title, div.widget[id*=black-studio-tinymce] .widget-action",function(){a(this).parents("#available-widgets").length||(bstw(a(this)).prepare().responsive().activate(),a("input[name=savewidget]",bstw(a(this)).get_widget()).on("click",function(){var b=a(this).closest(".widget").find(".wp-editor-wrap").height();a(this).closest(".widget").find(".wp-editor-wrap").height(b).append('<div class="bstw-loading"></div>'),a(this).closest(".widget").find(".bstw-loading").height(b).show(),bstw(a(this)).update_content()}))}),a(document).on("widget-added",function(a,b){b.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),bstw(b).activate())}),a(document).on("widget-updated",function(a,b){b.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),bstw(b).deactivate().activate())}),a(document).on("widget-synced",function(a,b){b.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),"visual"===bstw(b).get_mode()&&bstw(b).update_content())}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=tmce]",function(){bstw(a(this)).set_mode("visual")}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=html]",function(){bstw(a(this)).set_mode("html")}),a(document).on("click.wp-editor",".wp-editor-wrap",function(){this.id&&(window.wpActiveEditor=this.id.slice(3,-5))}),a(document).on("sortstart",function(b,c){var d=["body.wp-customizer .expanded > div[id*=black-studio-tinymce].widget",".widget-liquid-right div[id*=black-studio-tinymce].widget"];a(d.join(", ")).filter(":has(.widget-inside:visible)").each(function(){a(".widget-title",this).trigger("click"),bstw(a(this)).deactivate()}),c.item.is("[id*=black-studio-tinymce]")&&bstw(c.item.find("textarea[id^=widget-black-studio-tinymce]")).deactivate()}),a(document).on("sortstop",function(a,b){b.item.is("[id*=black-studio-tinymce]")&&bstw(b.item.find("textarea[id^=widget-black-studio-tinymce]")).activate()}),a(document).on("sortupdate",function(b,c){null!==b&&a(c.item).is(".ui-draggable")||(a("body").addClass("wait"),setTimeout(function(){a("textarea[id^=widget-black-studio-tinymce].active").each(function(){bstw(a(this)).deactivate()}),a("body").removeClass("wait")},500))}),"object"==typeof bstw_data.activate_events&&bstw_data.activate_events.length>0&&a(document).on(bstw_data.activate_events.join(" "),function(b){bstw(a(b.target)).activate()}),"object"==typeof bstw_data.deactivate_events&&bstw_data.deactivate_events.length>0&&a(document).on(bstw_data.deactivate_events.join(" "),function(b){bstw(a(b.target)).deactivate()}),a(window).resize(function(){a("textarea[id^=widget-black-studio-tinymce]").each(function(){bstw(a(this)).responsive()})}),a("body.widgets_access").size()>0&&bstw(a("textarea[id^=widget-black-studio-tinymce]").attr("id")).activate(),bstw("widget-black-studio-tinymce-__i__-text").deactivate(),a(document).on("click",".bstw-links-icon",function(b){b.preventDefault(),a(this).closest(".bstw-links").children(".bstw-links-list").toggle()})})}(jQuery);
|
js/wp-page-widget.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/* Black Studio TinyMCE Widget - v2.1.
|
2 |
!function(a){a(document).ready(function(){a(document).on("click","#pw-sidebars-customize div[id*=black-studio-tinymce].widget input.widget-control-save",function(){a(this).unbind("ajaxSuccess").ajaxSuccess(function(){a(this).trigger("widget-updated",[bstw(a(this)).get_widget()]).unbind("ajaxSuccess")})}),a(document).on("click","#pw-sidebars-customize div[id*=black-studio-tinymce].widget .widget-title",function(){var b=bstw(a(this)).get_textarea();b.hasClass("active")&&(bstw(a(this)).deactivate(),a(this).trigger("widget-added",[bstw(a(this)).get_widget()]))})})}(jQuery);
|
1 |
+
/* Black Studio TinyMCE Widget - v2.1.3 */
|
2 |
!function(a){a(document).ready(function(){a(document).on("click","#pw-sidebars-customize div[id*=black-studio-tinymce].widget input.widget-control-save",function(){a(this).unbind("ajaxSuccess").ajaxSuccess(function(){a(this).trigger("widget-updated",[bstw(a(this)).get_widget()]).unbind("ajaxSuccess")})}),a(document).on("click","#pw-sidebars-customize div[id*=black-studio-tinymce].widget .widget-title",function(){var b=bstw(a(this)).get_textarea();b.hasClass("active")&&(bstw(a(this)).deactivate(),a(this).trigger("widget-added",[bstw(a(this)).get_widget()]))})})}(jQuery);
|
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.1
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 2.1.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl.html
|
10 |
|
@@ -173,6 +173,12 @@ Plugin's data is stored in serialized format inside a record in the `wp_options`
|
|
173 |
|
174 |
== Changelog ==
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
= 2.1.2 (2014-10-13) =
|
177 |
* Hotfix for fullscreen mode when using Page Builder
|
178 |
|
@@ -213,7 +219,7 @@ Plugin's data is stored in serialized format inside a record in the `wp_options`
|
|
213 |
* Improved code quality and security thanks to [Scrutinizer](https://scrutinizer-ci.com/g/black-studio/black-studio-tinymce-widget/) service
|
214 |
* Improved development workflow thanks to [Grunt](http://gruntjs.com/)
|
215 |
* Improved performance and user experience
|
216 |
-
* A huge Thanks to @cfoellmann for his precious support and contributions
|
217 |
|
218 |
= 1.4.8 (2014-09-13) =
|
219 |
* Fixed bug on image captions on WordPress 4.0 (part 2)
|
@@ -366,5 +372,5 @@ Plugin's data is stored in serialized format inside a record in the `wp_options`
|
|
366 |
|
367 |
== Upgrade Notice ==
|
368 |
|
369 |
-
= 2.1.
|
370 |
Version 2.x is a major update. If you are upgrading from version 1.x please ensure to backup your database before upgrading.
|
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.1
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 2.1.3
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl.html
|
10 |
|
173 |
|
174 |
== Changelog ==
|
175 |
|
176 |
+
= 2.1.3 (2014-10-18) =
|
177 |
+
* Added ability to disable automatic addition of paragraphs when editing (i.e. using TinyMCE Advanced option)
|
178 |
+
* Enhanced real time rendering in theme customizer
|
179 |
+
* Fixed compatibility issue with Page Builder related to comment reply in admin
|
180 |
+
* Fixed compatibility issue with Styles plugin
|
181 |
+
|
182 |
= 2.1.2 (2014-10-13) =
|
183 |
* Hotfix for fullscreen mode when using Page Builder
|
184 |
|
219 |
* Improved code quality and security thanks to [Scrutinizer](https://scrutinizer-ci.com/g/black-studio/black-studio-tinymce-widget/) service
|
220 |
* Improved development workflow thanks to [Grunt](http://gruntjs.com/)
|
221 |
* Improved performance and user experience
|
222 |
+
* A huge Thanks to [@cfoellmann](https://github.com/cfoellmann) for his precious support and contributions
|
223 |
|
224 |
= 1.4.8 (2014-09-13) =
|
225 |
* Fixed bug on image captions on WordPress 4.0 (part 2)
|
372 |
|
373 |
== Upgrade Notice ==
|
374 |
|
375 |
+
= 2.1.3 =
|
376 |
Version 2.x is a major update. If you are upgrading from version 1.x please ensure to backup your database before upgrading.
|