Sha256: a76c2537bc5383efb4731737e7f8cdc54f99917b86153fa5504f15910e589519
Contents?: true
Size: 753 Bytes
Versions: 13
Compression:
Stored size: 753 Bytes
Contents
getCkEditorFuncNum = -> reParam = new RegExp( '(?:[\?&]|&)' + 'CKEditorFuncNum' + '=([^&]+)', 'i' ) match = window.location.search.match(reParam) if match && match.length > 0 match[1] $(document).on 'click', 'a[data-insert-ck-asset]', (event) -> ckeditor = getCkEditorFuncNum() if ckeditor && window.opener && window.opener.CKEDITOR event.preventDefault() attachment = $(event.currentTarget) url = attachment.attr('href') || attachment.attr('src') alt = attachment.attr('alt') || '' window.opener.CKEDITOR.tools.callFunction(ckeditor, url, -> dialog = this.getDialog() if dialog && dialog.getName() == 'image2' dialog.getContentElement('info', 'alt').setValue(alt) ) window.close()
Version data entries
13 entries across 13 versions & 1 rubygems