| /** |
| * @class button - insert non breakable space |
| * Если выделение схлопнуто и находится внутри div'a - он удаляется |
| * Новые div'ы создаются только из несхлопнутого выделения |
| * |
| * @param elRTE rte объект-редактор |
| * @param String name название кнопки |
| * |
| * @author: Dmitry Levashov (dio) dio@std42.ru |
| * @copyright: Studio 42, http://www.std42.ru |
| **/ |
| (function($) { |
| elRTE.prototype.ui.prototype.buttons.nbsp = function(rte, name) { |
| this.constructor.prototype.constructor.call(this, rte, name); |
| |
| this.command = function() { |
| this.rte.history.add(); |
| this.rte.selection.insertHtml(' ', true); |
| this.rte.window.focus(); |
| this.rte.ui.update(); |
| } |
| |
| this.update = function() { |
| this.domElem.removeClass('disabled'); |
| } |
| } |
| })(jQuery); |
| |