Changeset 609296
- Timestamp:
- 10/07/2012 10:24:18 PM (13 years ago)
- Location:
- ace-editor-for-wp
- Files:
-
- 6 edited
- 1 copied
-
tags/0.7 (copied) (copied from ace-editor-for-wp/trunk)
-
tags/0.7/ace4wp.php (modified) (2 diffs)
-
tags/0.7/aceinit.js (modified) (8 diffs)
-
tags/0.7/readme.txt (modified) (3 diffs)
-
trunk/ace4wp.php (modified) (2 diffs)
-
trunk/aceinit.js (modified) (8 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ace-editor-for-wp/tags/0.7/ace4wp.php
r609180 r609296 3 3 Plugin Name: ACE Editor for WP 4 4 Description: Adds ACE Editor to the post content editor for syntax-highlighting and more 5 Version: 0. 65 Version: 0.7 6 6 Author: daxitude 7 7 Author URI: http://github.com/daxitude/ … … 14 14 global $pagenow; 15 15 16 if ( 'post.php' == $pagenow ) {16 if ( 'post.php' == $pagenow || 'post-new.php' == $pagenow ) { 17 17 add_action( 'admin_head', array($this, 'inline_css') ); 18 18 add_action( 'admin_print_scripts-post.php', array($this, 'add_js') ); 19 add_action( 'admin_print_scripts-post-new.php', array($this, 'add_js') ); 19 add_action( 'admin_print_scripts-post-new.php', array($this, 'add_js') ); 20 20 } 21 21 } 22 22 23 // silly jQuery ui-resizable sets the width on #wp-content-editor-container even though we 23 24 // aren't allow resize in that direction. ugh -
ace-editor-for-wp/tags/0.7/aceinit.js
r609180 r609296 1 1 2 jQuery(document).ready(function ($) { 2 jQuery(document).ready(function ($) { 3 3 4 var AceSettings = AceSettings || {}; 4 var AceSettings = AceSettings || {}; 5 5 6 6 // constructor function … … 51 51 insertEditor: function () { 52 52 $('<div id="' + this.aceId + '"></div>') 53 .css({left: 0, top: 0, bottom: 0, right: 0, zIndex: 999})53 .css({left: 0, top: 0, bottom: 0, right: 0, zIndex: 1 }) 54 54 .insertAfter(this.$elem); 55 55 }, … … 69 69 var self = this; 70 70 this.$container 71 .resizable({handles: ' n,s'})72 .css({position: 'relative', height: this.defaultHt })71 .resizable({handles: 's'}) 72 .css({position: 'relative', height: this.defaultHt, minHeight: '200px'}) 73 73 .on('resize.aceEditorResize', function() { 74 74 self.editor.resize(true); … … 86 86 this.$editor.remove(); 87 87 this.editor.destroy(); 88 this.$container.resizable('destroy').off('resize.aceEditorResize').css({height: ' initial'});88 this.$container.resizable('destroy').off('resize.aceEditorResize').css({height: ''}); 89 89 this.$elem.show(); 90 90 this.loaded = false; … … 129 129 this.editor.getSession().setValue(value); 130 130 }, 131 onInit: function () { 131 onInit: function () { 132 132 var self = this; 133 133 // if the user has visual disabled, the html tab isn't there … … 140 140 .on('click.toggleAce', function () {if (!self.loaded) self.load();}); 141 141 142 $('#content-html, #content-tmce').on('click.destroyAce', function (e) {self.destroy(e);}); 142 $('#content-html, #content-tmce').on('click.destroyAce', function (e) { 143 // quick fix to make sure that the right content area gets set to display 144 // visible when its tab is clicked. for some reason the html textarea gets stuck on 145 // display:none when going from load->ACE->Visual->HTML 146 var clicked = $(e.currentTarget).attr('id').split('-')[1]; 147 switch (clicked) { 148 case 'tmce': 149 $('#content_parent').show(); 150 break; 151 case 'html': 152 self.$elem.show(); 153 break; 154 } 155 self.destroy(e); 156 }); 143 157 144 158 if (getUserSetting('ace_editor') == 1) this.load(); … … 157 171 onDestroy: function (e) { 158 172 var clicked = $(e.currentTarget).attr('id').split('-')[1]; 173 var check; 159 174 setUserSetting('ace_editor', 0); 175 setUserSetting('editor', clicked); 160 176 $("#wp-content-media-buttons").show(); 161 177 $('#wp-content-wrap').addClass(clicked + '-active').removeClass('ace-active'); 162 178 switch (clicked) { 163 179 case 'tmce': 164 $('#content_parent').show();165 180 this.$elem.hide(); 181 // the call to show() happens before tinymce has appended #content_parent 182 check = setInterval(function () { 183 $('#content_parent').show(); 184 if ($('#content_parent').length > 0) clearInterval(check); 185 }, 100); 166 186 break; 167 187 case 'html': 168 this.$elem.height(' auto');188 this.$elem.height(''); 169 189 break; 170 190 } … … 173 193 }); 174 194 175 195 176 196 }); 177 197 -
ace-editor-for-wp/tags/0.7/readme.txt
r609180 r609296 4 4 Requires at least: 3.4 5 5 Tested up to: 3.4.2 6 Stable tag: 0. 66 Stable tag: 0.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 16 16 NOTE: Visual Mode tends to eat up most/all of any special formatting. If you want to use ACE I'd suggest disabling Visual mode completely. You can do this easily yourself under Users -> Your Profile -> 'Disable the visual editor when writing'. You can also do it for all users and for specific post types only. See the accompanying file no-visual.php for an example. 17 18 Not all features work in Internet Explorer v8 and earlier. 17 19 18 20 This does not work in full screen mode. Yet. … … 48 50 * allow users to set their ACE preferences on their profile screen 49 51 52 == Changelog == 53 54 = 0.7 = 55 * bugfix - make sure ACE loads on post-new.php 56 * bugfix - adjust z-index on ACE Editor so wp nav menus stay on top 57 * bugfix - make ACE resizable only in south direction 58 59 = 0.6 = 60 * bugfix - in JS, check to make sure tinymce is available 61 62 = 0.5 = 63 * initial release 64 -
ace-editor-for-wp/trunk/ace4wp.php
r609180 r609296 3 3 Plugin Name: ACE Editor for WP 4 4 Description: Adds ACE Editor to the post content editor for syntax-highlighting and more 5 Version: 0. 65 Version: 0.7 6 6 Author: daxitude 7 7 Author URI: http://github.com/daxitude/ … … 14 14 global $pagenow; 15 15 16 if ( 'post.php' == $pagenow ) {16 if ( 'post.php' == $pagenow || 'post-new.php' == $pagenow ) { 17 17 add_action( 'admin_head', array($this, 'inline_css') ); 18 18 add_action( 'admin_print_scripts-post.php', array($this, 'add_js') ); 19 add_action( 'admin_print_scripts-post-new.php', array($this, 'add_js') ); 19 add_action( 'admin_print_scripts-post-new.php', array($this, 'add_js') ); 20 20 } 21 21 } 22 22 23 // silly jQuery ui-resizable sets the width on #wp-content-editor-container even though we 23 24 // aren't allow resize in that direction. ugh -
ace-editor-for-wp/trunk/aceinit.js
r609180 r609296 1 1 2 jQuery(document).ready(function ($) { 2 jQuery(document).ready(function ($) { 3 3 4 var AceSettings = AceSettings || {}; 4 var AceSettings = AceSettings || {}; 5 5 6 6 // constructor function … … 51 51 insertEditor: function () { 52 52 $('<div id="' + this.aceId + '"></div>') 53 .css({left: 0, top: 0, bottom: 0, right: 0, zIndex: 999})53 .css({left: 0, top: 0, bottom: 0, right: 0, zIndex: 1 }) 54 54 .insertAfter(this.$elem); 55 55 }, … … 69 69 var self = this; 70 70 this.$container 71 .resizable({handles: ' n,s'})72 .css({position: 'relative', height: this.defaultHt })71 .resizable({handles: 's'}) 72 .css({position: 'relative', height: this.defaultHt, minHeight: '200px'}) 73 73 .on('resize.aceEditorResize', function() { 74 74 self.editor.resize(true); … … 86 86 this.$editor.remove(); 87 87 this.editor.destroy(); 88 this.$container.resizable('destroy').off('resize.aceEditorResize').css({height: ' initial'});88 this.$container.resizable('destroy').off('resize.aceEditorResize').css({height: ''}); 89 89 this.$elem.show(); 90 90 this.loaded = false; … … 129 129 this.editor.getSession().setValue(value); 130 130 }, 131 onInit: function () { 131 onInit: function () { 132 132 var self = this; 133 133 // if the user has visual disabled, the html tab isn't there … … 140 140 .on('click.toggleAce', function () {if (!self.loaded) self.load();}); 141 141 142 $('#content-html, #content-tmce').on('click.destroyAce', function (e) {self.destroy(e);}); 142 $('#content-html, #content-tmce').on('click.destroyAce', function (e) { 143 // quick fix to make sure that the right content area gets set to display 144 // visible when its tab is clicked. for some reason the html textarea gets stuck on 145 // display:none when going from load->ACE->Visual->HTML 146 var clicked = $(e.currentTarget).attr('id').split('-')[1]; 147 switch (clicked) { 148 case 'tmce': 149 $('#content_parent').show(); 150 break; 151 case 'html': 152 self.$elem.show(); 153 break; 154 } 155 self.destroy(e); 156 }); 143 157 144 158 if (getUserSetting('ace_editor') == 1) this.load(); … … 157 171 onDestroy: function (e) { 158 172 var clicked = $(e.currentTarget).attr('id').split('-')[1]; 173 var check; 159 174 setUserSetting('ace_editor', 0); 175 setUserSetting('editor', clicked); 160 176 $("#wp-content-media-buttons").show(); 161 177 $('#wp-content-wrap').addClass(clicked + '-active').removeClass('ace-active'); 162 178 switch (clicked) { 163 179 case 'tmce': 164 $('#content_parent').show();165 180 this.$elem.hide(); 181 // the call to show() happens before tinymce has appended #content_parent 182 check = setInterval(function () { 183 $('#content_parent').show(); 184 if ($('#content_parent').length > 0) clearInterval(check); 185 }, 100); 166 186 break; 167 187 case 'html': 168 this.$elem.height(' auto');188 this.$elem.height(''); 169 189 break; 170 190 } … … 173 193 }); 174 194 175 195 176 196 }); 177 197 -
ace-editor-for-wp/trunk/readme.txt
r609180 r609296 4 4 Requires at least: 3.4 5 5 Tested up to: 3.4.2 6 Stable tag: 0. 66 Stable tag: 0.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 16 16 NOTE: Visual Mode tends to eat up most/all of any special formatting. If you want to use ACE I'd suggest disabling Visual mode completely. You can do this easily yourself under Users -> Your Profile -> 'Disable the visual editor when writing'. You can also do it for all users and for specific post types only. See the accompanying file no-visual.php for an example. 17 18 Not all features work in Internet Explorer v8 and earlier. 17 19 18 20 This does not work in full screen mode. Yet. … … 48 50 * allow users to set their ACE preferences on their profile screen 49 51 52 == Changelog == 53 54 = 0.7 = 55 * bugfix - make sure ACE loads on post-new.php 56 * bugfix - adjust z-index on ACE Editor so wp nav menus stay on top 57 * bugfix - make ACE resizable only in south direction 58 59 = 0.6 = 60 * bugfix - in JS, check to make sure tinymce is available 61 62 = 0.5 = 63 * initial release 64
Note: See TracChangeset
for help on using the changeset viewer.