/* * XEED - XpressEngine WYSIWYG Editor * @author nhn (developers@xpressengine.com) */ (function($){ var d = document, fn, dp, dc, rx_command = /(?:^| )@(\w+)(?: |$)/, rx_block = /^(H[1-6R]|P|DIV|ADDRESS|PRE|FORM|T(ABLE|BODY|HEAD|FOOT|H|R|D)|LI|OL|UL|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|MENU|ISINDEX|SAMP)$/i, invisibleCh = '\uFEFF', _nt_ = 'nodeType', _nn_ = 'nodeName', _ps_ = 'previousSibling', _ns_ = 'nextSibling', _pn_ = 'parentNode', _cn_ = 'childNodes', _ca_ = 'commonAncestorContainer', _sc_ = 'startContainer', _so_ = 'startOffset', _ec_ = 'endContainer', _eo_ = 'endOffset', _osc_ = 'oStartContainer', _iso_ = 'iStartOffset', _oec_ = 'oEndContainer', _ieo_ = 'iEndOffset', _xr_ = '_xeed_root', rx_root = new RegExp('(?:^|\\s)'+_xr_+'(?:\\s|$)'), Xeed, XHTMLT, Simple, Block, Font, Filter, EditMode, LineBreak, Resize, UndoRedo, SChar, Table, URL, AutoSave, FindReplace, Clear, DOMFix; Xeed = xe.createApp('Xeed', { $textarea : null, $richedit : null, $toolbar : null, $root : null, _options : null, last_node : null, /** * @brief constructor */ init : function(obj, options) { var self=this, $obj=$(obj), $text, $edit, opts, content, plugins, i, c, tmpId; // Options opts = $.extend({ minHeight : 400 }, options); this._options = opts; // if ($obj.is('textarea')) { $text = $obj; content = $obj.val(); } else { $text = $obj.before('