Changeset 612305
- Timestamp:
- 10/14/2012 03:29:46 PM (13 years ago)
- Location:
- lineunbreaker/trunk
- Files:
-
- 5 edited
-
editor_plugin.js (modified) (1 diff)
-
editor_plugin_src.js (modified) (2 diffs)
-
isa-tinymce-lineunbreaker.php (modified) (1 diff)
-
lineunbreaker_qtags.js (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lineunbreaker/trunk/editor_plugin.js
r607350 r612305 1 (function(){tinymce.create('tinymce.plugins.Lineunbreaker',{init:function(ed,url){ed.addCommand('mceLineunbreak',function(){var content=ed.selection.getContent();var contentClean=content.replace(/(\r\n|\n|\r|<br\s*[\/]?>)/gim,' ');ed.selection.setContent(contentClean)});ed.addButton('lineunbreak',{title:'Removes linebreaks from selected text',cmd:'mceLineunbreak',image:url+'/img/lineunbreaker.gif'})},getInfo:function(){return{longname:'Lineunbreaker',author:'Andre Lohan',authorurl:'http://wordpress.org/extend/plugins/lineunbreaker/',infourl:'',version:"1.0"}}});tinymce.PluginManager.add('lineunbreaker',tinymce.plugins.Lineunbreaker)})();1 (function(){tinymce.create('tinymce.plugins.Lineunbreaker',{init:function(ed,url){ed.addCommand('mceLineunbreak',function(){var content=ed.selection.getContent();var contentClean=content.replace(/(\r\n|\n|\r|<br\s*[\/]?>)/gim,'');ed.selection.setContent(contentClean)});ed.addButton('lineunbreak',{title:'Removes linebreaks from selected text',cmd:'mceLineunbreak',image:url+'/img/lineunbreaker.gif'})},getInfo:function(){return{longname:'Lineunbreaker',author:'Andre Lohan',authorurl:'http://wordpress.org/extend/plugins/lineunbreaker/',infourl:'',version:"1.1"}}});tinymce.PluginManager.add('lineunbreaker',tinymce.plugins.Lineunbreaker)})(); -
lineunbreaker/trunk/editor_plugin_src.js
r607350 r612305 6 6 ed.addCommand('mceLineunbreak', function() { 7 7 var content = ed.selection.getContent(); 8 var contentClean = content.replace(/(\r\n|\n|\r|<br\s*[\/]?>)/gim, ' ');8 var contentClean = content.replace(/(\r\n|\n|\r|<br\s*[\/]?>)/gim, ''); 9 9 ed.selection.setContent(contentClean); 10 10 }); … … 25 25 authorurl : 'http://wordpress.org/extend/plugins/lineunbreaker/', 26 26 infourl : '', 27 version : "1. 0"27 version : "1.1" 28 28 }; 29 29 } -
lineunbreaker/trunk/isa-tinymce-lineunbreaker.php
r607350 r612305 4 4 Plugin URI: http://wordpress.org/extend/plugins/lineunbreaker/ 5 5 Description: Removes line breaks from selected text in visual editor. 6 Version: 1. 06 Version: 1.1 7 7 Author: dc5ala 8 8 License: GPL2 -
lineunbreaker/trunk/lineunbreaker_qtags.js
r607350 r612305 1 //jQuery(document).ready(function($) {2 // var button = '<input id="lineunbreaker_qtag" class="ed_button" type="button" value="Lineunbreak" />';3 // alert($('#ed_toolbar').html());4 // $('#ed_toolbar').append('TEST');5 //});6 1 QTags.addButton( 'lineunbreaker', '!br', lineunbreaker_qtags ); 7 2 function lineunbreaker_qtags() { … … 12 7 var selectedContent = ed.val().substring(start, end); 13 8 14 var contentClean = selectedContent.replace(/(\r\n|\n|\r|<br\s*[\/]?>)/gim, ' ');9 var contentClean = selectedContent.replace(/(\r\n|\n|\r|<br\s*[\/]?>)/gim, ''); 15 10 ed.val(ed.val().substring(0, start) + contentClean + ed.val().substring(end, len)); 16 11 } 17 18 19 -
lineunbreaker/trunk/readme.txt
r607355 r612305 4 4 Requires at least: 3.2 5 5 Tested up to: 3.4.2 6 Stable tag: 1. 06 Stable tag: 1.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 30 30 == Changelog == 31 31 32 = 1.1 = 33 * Removed whitespace as replacement. Let me know when you have troubles with joined sentences missing a space. 34 32 35 = 1.0 = 33 36 * Initial release.
Note: See TracChangeset
for help on using the changeset viewer.