Changeset 971853
- Timestamp:
- 08/24/2014 07:56:18 PM (12 years ago)
- Location:
- mce-table-buttons/trunk
- Files:
-
- 3 added
- 2 edited
-
mce_table_buttons.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
-
tinymce41-table (added)
-
tinymce41-table/plugin.js (added)
-
tinymce41-table/plugin.min.js (added)
Legend:
- Unmodified
- Added
- Removed
-
mce-table-buttons/trunk/mce_table_buttons.php
r924343 r971853 4 4 Plugin URI: http://10up.com/plugins-modules/wordpress-mce-table-buttons/ 5 5 Description: Add <strong>controls for table editing</strong> to the visual content editor with this <strong>light weight</strong> plug-in. 6 Version: 3. 16 Version: 3.2 7 7 Author: Jake Goldman, 10up, Oomph 8 8 Author URI: http://10up.com … … 40 40 add_filter( 'mce_external_plugins', array( __CLASS__, 'mce_external_plugins' ) ); 41 41 add_filter( 'mce_buttons_2', array( __CLASS__, 'mce_buttons_2' ) ); 42 add_ action( 'content_save_pre', array( __CLASS__, 'content_save_pre'), 100 );42 add_filter( 'content_save_pre', array( __CLASS__, 'content_save_pre' ), 20 ); 43 43 } 44 44 … … 51 51 public static function mce_external_plugins( $plugin_array ) { 52 52 global $tinymce_version; 53 $variant = ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) ? '' : '.min'; 53 54 54 55 if ( version_compare( $tinymce_version, '400', '<' ) ) { … … 61 62 $plugin_array['mcetablebuttons'] = $plugin_dir_url . 'tinymce3-assets/mce-table-buttons.js'; 62 63 64 } elseif ( version_compare( $tinymce_version, '4100', '<' ) ) { 65 66 $plugin_array['table'] = plugin_dir_url( __FILE__ ) . 'tinymce4-table/plugin' . $variant . '.js'; 67 63 68 } else { 64 69 65 $variant = ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) ? '' : '.min'; 66 $plugin_array['table'] = plugin_dir_url( __FILE__ ) . 'tinymce4-table/plugin' . $variant . '.js'; 70 $plugin_array['table'] = plugin_dir_url( __FILE__ ) . 'tinymce41-table/plugin' . $variant . '.js'; 67 71 68 72 } … … 117 121 */ 118 122 public static function content_save_pre( $content ) { 119 if ( substr( $content, -8 ) == '</table>' ) 120 $content .= "\n<br />"; 123 if ( false !== strpos( $content, '<table' ) ) { 124 // paragraphed content inside of a td requires first paragraph to have extra line breaks (or else autop breaks) 125 $content = preg_replace( "/<td([^>]*)>(.+\r?\n\r?\n)/m", "<td$1>\n\n$2", $content ); 126 127 // make sure there's space around the table 128 if ( substr( $content, -8 ) == '</table>' ) { 129 $content .= "\n<br />"; 130 } 131 } 121 132 122 133 return $content; -
mce-table-buttons/trunk/readme.txt
r924343 r971853 4 4 Tags: tables, table, editor, WYSIWYG, buttons, tinymce 5 5 Requires at least: 3.4 6 Tested up to: 3.97 Stable tag: 3. 16 Tested up to: 4.0 7 Stable tag: 3.2 8 8 9 9 Adds table editing controls to the visual content editor (TinyMCE). … … 30 30 31 31 == Changelog == 32 33 = 3.2 = 34 * WordPress 4.0 support, including a much newer TinyMCE plugin, with many new features, including background color and horizontal alignment 35 * Dramatically improved support for paragraphed content inside of a cell (paragraph breaks no longer disappear on save) 32 36 33 37 = 3.1 =
Note: See TracChangeset
for help on using the changeset viewer.