mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
1 line
No EOL
962 B
JavaScript
1 line
No EOL
962 B
JavaScript
function _getCkeInstance(a){var b=jQuery("#ckeditor_instance_"+a);return b.data("cke_instance")}function editorGetContentTextarea_xe(a){return _getCkeInstance(a).getText()}function editorGetSelectedHtml(a){return _getCkeInstance(a).getSelection().getSelectedText()}function editorGetContent(a){return _getCkeInstance(a).getData()}function editorReplaceHTML(a,b){b=editorReplacePath(b);var c=parseInt(a.id.replace(/^.*_/,""),10);_getCkeInstance(c).insertHtml(b,"unfiltered_html")}function editorGetIFrame(a){return jQuery("#ckeditor_instance_"+a).get(0)}function editorReplacePath(a){return a=a.replace(/\<([^\>\<]*)(src=|href=|url\()("|\')*([^"\'\)]+)("|\'|\))*(\s|>)*/gi,function(a,b,c,d,e,f,g){"url("==c?(d="",f=")"):("undefined"==typeof d&&(d='"'),"undefined"==typeof f&&(f='"'),"undefined"==typeof g&&(g=""));var h=jQuery.trim(e).replace(/^\.\//,"");return/^(http\:|https\:|ftp\:|telnet\:|mms\:|mailto\:|\/|\.\.|\#)/i.test(h)?a:"<"+b+c+d+request_uri+h+f+g})} |