Changeset 591398
- Timestamp:
- 08/28/2012 04:10:47 PM (14 years ago)
- Location:
- preserved-html-editor-markup/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
sb_preserved_markup.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
preserved-html-editor-markup/trunk/readme.txt
r590703 r591398 15 15 It also supports HTML5 Block Anchor tags, something that is currently not supported in WP even via any existing plugins. 16 16 17 With version 1.3 you can now use inline CSS and JavaScript in the HTML editor and everything should be preserved. To be clear, this applies to tags only, like `onclick` events and style definitions - not script blocks themselves. To enable this feature you must disable the `wptexturize` and `convert_chars` filters by adding the following code to your theme's `functions.php`: 17 Version 1.4 is just a minor patch release. User @denl noticed a problem with the plugin CataBlog which implements its own administrative management features by disabling the 'show_ui' flag for its custom post type. I was ignoring any custom post type that didn't have a GUI, but it was an unecessary filter that probably limited other plugins. This fix allows any post type that supports the TinyMCE editor to be "fixed" using the tools under Admin > Settings > Writing. 18 19 Since version 1.3 you can now use inline CSS and JavaScript in the HTML editor and everything should be preserved. To be clear, this applies to tags only, like `onclick` events and style definitions - not script blocks themselves. To enable this feature you must disable the `wptexturize` and `convert_chars` filters by adding the following code to your theme's `functions.php`: 18 20 19 21 remove_filter("the_content", "wptexturize"); … … 85 87 86 88 == Changelog == 89 = 1.4 = 90 * Removed 'show_ui' filter for fix custom post type buttons. 87 91 = 1.3 = 88 92 * Added support for inline JavaScript and CSS, as long as the wptexturize and convert_chars filters are disabled. (Thanks to ViennaMex for pointed out the problem.) -
preserved-html-editor-markup/trunk/sb_preserved_markup.php
r590703 r591398 8 8 Author: Marcus E. Pope, marcuspope 9 9 Author URI: http://www.marcuspope.com 10 Version: 1. 310 Version: 1.4 11 11 12 12 Copyright 2011 Marcus E. Pope (email : me@marcuspope.com) … … 374 374 add_settings_section('emc2_editor_insert_p', 'WYSIWYG New Line Behavior', array('MP_WP_Preserved_Markup', 'render_setting_section'), 'writing'); 375 375 376 //Add settings fields for each gui'dpost type that supports a wysiwyg editor377 $types = get_post_types(array( 'show_ui' => true), "objects");376 //Add settings fields for each custom post type that supports a wysiwyg editor 377 $types = get_post_types(array(), "objects"); 378 378 379 379 foreach ($types as $id => $type) { … … 421 421 echo "<p class='pressthis'>"; 422 422 foreach (self::$valid_types as $o) { 423 echo "<a style='width: auto; padding-right: 8px; cursor: pointer;' onclick='emc2pm_fix_content(\"{$o['id']}\"); return false;' href='#'><span>Fix {$o['label']}</span></a> ";423 echo "<a style='width: auto; margin-bottom: 10px; padding-right: 8px; cursor: pointer;' onclick='emc2pm_fix_content(\"{$o['id']}\"); return false;' href='#'><span>Fix {$o['label']}</span></a> "; 424 424 } 425 425 echo "</p>";
Note: See TracChangeset
for help on using the changeset viewer.