openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

trumbowyg.allowtagsfrompaste.min.js (1240B)


      1 !function(e){"use strict";var t={allowTagsFromPaste:["a","abbr","address","b","bdi","bdo","blockquote","br","cite","code","del","dfn","details","em","h1","h2","h3","h4","h5","h6","hr","i","ins","kbd","mark","meter","pre","progress","q","rp","rt","ruby","s","samp","small","span","strong","sub","summary","sup","time","u","var","wbr","img","map","area","canvas","figcaption","figure","picture","audio","source","track","video","ul","ol","li","dl","dt","dd","table","caption","th","tr","td","thead","tbody","tfoot","col","colgroup","style","div","p","form","input","textarea","button","select","optgroup","option","label","fieldset","legend","datalist","keygen","output","iframe","link","nav","header","hgroup","footer","main","section","article","aside","dialog","script","noscript","embed","object","param"]};e.extend(!0,e.trumbowyg,{plugins:{allowTagsFromPaste:{init:function(a){a.o.removeformatPasted=!1,a.o.plugins.allowTagsFromPaste=a.o.allowTagsFromPaste?e(t.allowTagsFromPaste).not(a.o.allowTagsFromPaste).get():[],a.pasteHandlers.push(function(){setTimeout(function(){var t=a.$ed.html();e.each(a.o.plugins.allowTagsFromPaste,function(e,a){t=t.replace(new RegExp("<\\/?"+a+"(\\s[^>]*)?>","gi"),"")}),a.$ed.html(t)},0)})}}}})}(jQuery);