TinyMCE Advanced - Version 4.3.10.1

Version Description

  • Fixed adding paragraph tags when loading posts that were saved before turning autop off.
  • Disabled the (new) inline toolbar for tables as it was overlapping the table in some cases.
Download this release

Release Info

Developer azaozz
Plugin Icon 128x128 TinyMCE Advanced
Version 4.3.10.1
Comparing to
See all releases

Code changes from version 4.3.10 to 4.3.10.1

mce/wptadv/plugin.js CHANGED
@@ -85,8 +85,15 @@ tinymce.PluginManager.add( 'wptadv', function( editor ) {
85
  });
86
 
87
  editor.on( 'beforeSetContent', function( event ) {
 
 
 
88
  if ( event.load ) {
89
  event.content = event.content.replace( /(^|[\r\n]+)\s*(https?:\/\/[^<>"\s]+)[ \u00A0\uFEFF]*([\r\n]+|$)/igm, '$1<p>$2</p>$3' );
 
 
 
 
90
  }
91
  }, true );
92
  }
85
  });
86
 
87
  editor.on( 'beforeSetContent', function( event ) {
88
+ var wp = window.wp,
89
+ autop = wp && wp.editor && wp.editor.autop;
90
+
91
  if ( event.load ) {
92
  event.content = event.content.replace( /(^|[\r\n]+)\s*(https?:\/\/[^<>"\s]+)[ \u00A0\uFEFF]*([\r\n]+|$)/igm, '$1<p>$2</p>$3' );
93
+
94
+ if ( autop && event.content && event.content.indexOf( '\n' ) > -1 && ! /<p>/i.test( event.content ) ) {
95
+ event.content = autop( event.content );
96
+ }
97
  }
98
  }, true );
99
  }
mce/wptadv/plugin.min.js CHANGED
@@ -1 +1 @@
1
- tinymce.PluginManager.add("wptadv",function(a){function b(a){return a=a.replace(new RegExp("<(?:"+d+")(?: [^>]*)?>","gi"),"\n$&"),a=a.replace(new RegExp("</(?:"+d+")>","gi"),"$&\n"),a=a.replace(new RegExp("<br(?: [^>]*)?>","gi"),"$&\n"),a=a.replace(/>\n\n</g,">\n<"),a=a.replace(/^<li/gm," <li"),e(a)}var c=[new RegExp("https?://(www\\.)?youtube\\.com/(watch|playlist).*","i"),new RegExp("https?://youtu.be/.*","i"),new RegExp("https?://blip.tv/.*","i"),new RegExp("https?://(www\\.)?vimeo\\.com/.*","i"),new RegExp("https?://(www\\.)?dailymotion\\.com/.*","i"),new RegExp("https?://dai.ly/.*","i"),new RegExp("https?://(www\\.)?flickr\\.com/.*","i"),new RegExp("https?://flic.kr/.*","i"),new RegExp("https?://(.+\\.)?smugmug\\.com/.*","i"),new RegExp("https?://(www\\.)?hulu\\.com/watch/.*","i"),new RegExp("https?://(www\\.)?viddler\\.com/.*","i"),new RegExp("https?://qik.com/.*","i"),new RegExp("https?://revision3.com/.*","i"),new RegExp("https?://i*.photobucket.com/albums/.*","i"),new RegExp("https?://gi*.photobucket.com/groups/.*","i"),new RegExp("https?://(www\\.)?scribd\\.com/.*","i"),new RegExp("https?://wordpress.tv/.*","i"),new RegExp("https?://(.+\\.)?polldaddy\\.com/.*","i"),new RegExp("https?://poll\\.fm/.*","i"),new RegExp("https?://(www\\.)?funnyordie\\.com/videos/.*","i"),new RegExp("https?://(www\\.)?twitter\\.com/.+?/status(es)?/.*","i"),new RegExp("https?://vine\\.co/v/.*","i"),new RegExp("https?://(www\\.)?soundcloud\\.com/.*","i"),new RegExp("https?://(www\\.)?slideshare\\.net/.*","i"),new RegExp("https?://instagr(\\.am|am\\.com)/p/.*","i"),new RegExp("https?://(www\\.)?rdio\\.com/.*","i"),new RegExp("https?://rd\\.io/x/.*","i"),new RegExp("https?://(open|play)\\.spotify\\.com/.*","i"),new RegExp("https?://(.+\\.)?imgur\\.com/.*","i"),new RegExp("https?://(www\\.)?meetu(\\.ps|p\\.com)/.*","i"),new RegExp("https?://(www\\.)?issuu\\.com/.+/docs/.*","i"),new RegExp("https?://(www\\.)?collegehumor\\.com/video/.*","i"),new RegExp("https?://(www\\.)?mixcloud\\.com/.*","i"),new RegExp("https?://(www\\.|embed\\.)?ted\\.com/talks/.*","i"),new RegExp("https?://(www\\.)(animoto|video214)\\.com/play/.*","i"),new RegExp("https?://(.+).tumblr.com/post/.*","i"),new RegExp("https?://(www.)?kickstarter.com/projects/.*","i"),new RegExp("https?://kck.st/.*","i")],d="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary",e=tinymce.trim;!a.settings.wpautop&&a.settings.tadv_noautop&&(a.on("init",function(){a.on("SaveContent",function(a){a.content=a.content.replace(/<p>\s*(https?:\/\/[^<>"\s]+)\s*<\/p>/gi,function(a,b){for(var d in c)if(c[d].test(b))return"\n"+b+"\n";return a}).replace(/caption\](\s|<br[^>]*>|<p>&nbsp;<\/p>)*\[caption/g,"caption] [caption").replace(/<(object|audio|video)[\s\S]+?<\/\1>/g,function(a){return a.replace(/[\r\n]+/g," ")}).replace(/<pre[^>]*>[\s\S]+?<\/pre>/g,function(a){return a=a.replace(/<br ?\/?>(\r\n|\n)?/g,"\n"),a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"\n")})}),a.on("hide",function(){var c=a.getElement();c.value=b(c.value)})}),a.on("beforeSetContent",function(a){a.load&&(a.content=a.content.replace(/(^|[\r\n]+)\s*(https?:\/\/[^<>"\s]+)[ \u00A0\uFEFF]*([\r\n]+|$)/gim,"$1<p>$2</p>$3"))},!0))});
1
+ tinymce.PluginManager.add("wptadv",function(a){function b(a){return a=a.replace(new RegExp("<(?:"+d+")(?: [^>]*)?>","gi"),"\n$&"),a=a.replace(new RegExp("</(?:"+d+")>","gi"),"$&\n"),a=a.replace(new RegExp("<br(?: [^>]*)?>","gi"),"$&\n"),a=a.replace(/>\n\n</g,">\n<"),a=a.replace(/^<li/gm," <li"),e(a)}var c=[new RegExp("https?://(www\\.)?youtube\\.com/(watch|playlist).*","i"),new RegExp("https?://youtu.be/.*","i"),new RegExp("https?://blip.tv/.*","i"),new RegExp("https?://(www\\.)?vimeo\\.com/.*","i"),new RegExp("https?://(www\\.)?dailymotion\\.com/.*","i"),new RegExp("https?://dai.ly/.*","i"),new RegExp("https?://(www\\.)?flickr\\.com/.*","i"),new RegExp("https?://flic.kr/.*","i"),new RegExp("https?://(.+\\.)?smugmug\\.com/.*","i"),new RegExp("https?://(www\\.)?hulu\\.com/watch/.*","i"),new RegExp("https?://(www\\.)?viddler\\.com/.*","i"),new RegExp("https?://qik.com/.*","i"),new RegExp("https?://revision3.com/.*","i"),new RegExp("https?://i*.photobucket.com/albums/.*","i"),new RegExp("https?://gi*.photobucket.com/groups/.*","i"),new RegExp("https?://(www\\.)?scribd\\.com/.*","i"),new RegExp("https?://wordpress.tv/.*","i"),new RegExp("https?://(.+\\.)?polldaddy\\.com/.*","i"),new RegExp("https?://poll\\.fm/.*","i"),new RegExp("https?://(www\\.)?funnyordie\\.com/videos/.*","i"),new RegExp("https?://(www\\.)?twitter\\.com/.+?/status(es)?/.*","i"),new RegExp("https?://vine\\.co/v/.*","i"),new RegExp("https?://(www\\.)?soundcloud\\.com/.*","i"),new RegExp("https?://(www\\.)?slideshare\\.net/.*","i"),new RegExp("https?://instagr(\\.am|am\\.com)/p/.*","i"),new RegExp("https?://(www\\.)?rdio\\.com/.*","i"),new RegExp("https?://rd\\.io/x/.*","i"),new RegExp("https?://(open|play)\\.spotify\\.com/.*","i"),new RegExp("https?://(.+\\.)?imgur\\.com/.*","i"),new RegExp("https?://(www\\.)?meetu(\\.ps|p\\.com)/.*","i"),new RegExp("https?://(www\\.)?issuu\\.com/.+/docs/.*","i"),new RegExp("https?://(www\\.)?collegehumor\\.com/video/.*","i"),new RegExp("https?://(www\\.)?mixcloud\\.com/.*","i"),new RegExp("https?://(www\\.|embed\\.)?ted\\.com/talks/.*","i"),new RegExp("https?://(www\\.)(animoto|video214)\\.com/play/.*","i"),new RegExp("https?://(.+).tumblr.com/post/.*","i"),new RegExp("https?://(www.)?kickstarter.com/projects/.*","i"),new RegExp("https?://kck.st/.*","i")],d="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary",e=tinymce.trim;!a.settings.wpautop&&a.settings.tadv_noautop&&(a.on("init",function(){a.on("SaveContent",function(a){a.content=a.content.replace(/<p>\s*(https?:\/\/[^<>"\s]+)\s*<\/p>/gi,function(a,b){for(var d in c)if(c[d].test(b))return"\n"+b+"\n";return a}).replace(/caption\](\s|<br[^>]*>|<p>&nbsp;<\/p>)*\[caption/g,"caption] [caption").replace(/<(object|audio|video)[\s\S]+?<\/\1>/g,function(a){return a.replace(/[\r\n]+/g," ")}).replace(/<pre[^>]*>[\s\S]+?<\/pre>/g,function(a){return a=a.replace(/<br ?\/?>(\r\n|\n)?/g,"\n"),a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"\n")})}),a.on("hide",function(){var c=a.getElement();c.value=b(c.value)})}),a.on("beforeSetContent",function(a){var b=window.wp,c=b&&b.editor&&b.editor.autop;a.load&&(a.content=a.content.replace(/(^|[\r\n]+)\s*(https?:\/\/[^<>"\s]+)[ \u00A0\uFEFF]*([\r\n]+|$)/gim,"$1<p>$2</p>$3"),c&&a.content&&a.content.indexOf("\n")>-1&&!/<p>/i.test(a.content)&&(a.content=c(a.content)))},!0))});
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: azaozz
3
  Tags: wysiwyg, formatting, tinymce, write, editor
4
  Requires at least: 4.5
5
  Tested up to: 4.5
6
- Stable tag: 4.3.8
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -30,6 +30,10 @@ Best is to install directly from WordPress. If manual installation is required,
30
 
31
  == Changelog ==
32
 
 
 
 
 
33
  = 4.3.10 =
34
  * Updated for WordPress 4.5.1 and TinyMCE 4.3.10.
35
  * Fixed support for adding editor-style.css to themes that don't have it.
3
  Tags: wysiwyg, formatting, tinymce, write, editor
4
  Requires at least: 4.5
5
  Tested up to: 4.5
6
+ Stable tag: 4.3.10
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
30
 
31
  == Changelog ==
32
 
33
+ = 4.3.10.1 =
34
+ * Fixed adding paragraph tags when loading posts that were saved before turning autop off.
35
+ * Disabled the (new) inline toolbar for tables as it was overlapping the table in some cases.
36
+
37
  = 4.3.10 =
38
  * Updated for WordPress 4.5.1 and TinyMCE 4.3.10.
39
  * Fixed support for adding editor-style.css to themes that don't have it.
tinymce-advanced.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: TinyMCE Advanced
4
  Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
5
  Description: Enables advanced features and plugins in TinyMCE, the visual editor in WordPress.
6
- Version: 4.3.10
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9
  License: GPL2
@@ -568,6 +568,10 @@ class Tinymce_Advanced {
568
  $init['paste_data_images'] = true;
569
  }
570
 
 
 
 
 
571
  return $init;
572
  }
573
 
3
  Plugin Name: TinyMCE Advanced
4
  Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
5
  Description: Enables advanced features and plugins in TinyMCE, the visual editor in WordPress.
6
+ Version: 4.3.10.1
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9
  License: GPL2
568
  $init['paste_data_images'] = true;
569
  }
570
 
571
+ if ( in_array( 'table', $this->plugins, true ) ) {
572
+ $init['table_toolbar'] = false;
573
+ }
574
+
575
  return $init;
576
  }
577