Sha256: 748441917bed6cf7055de7f49861e9c4d00c581cb989f5cf955f07f2651fa00c
Contents?: true
Size: 728 Bytes
Versions: 54
Compression:
Stored size: 728 Bytes
Contents
<%- ext = File.extname(@filename).gsub(/\?\d+/, '') ext = (ext.blank? ? 'generic' : ext.gsub(/\./, '')) -%> <%= javascript_tag <<-EOF var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); linkNode = dojo.withGlobal(curInst.window, "getAncestorElement", dojo.html.selection, ['a']); curInst.restoreSelection(); if (!linkNode) { var html = dojo.withGlobal(curInst.window, 'getSelectedHtml', dojo.html.selection); } else { var html = linkNode.innerHTML; dojo.withGlobal(curInst.window, 'selectElement', dojo.html.selection, [linkNode]); } curInst.execCommand('inserthtml', '<a href=\"#{page_file_path(@pg, @filename)}\" class=\"file-#{ext}\" target=\"_blank\">'+html+'</a>'); cancelInsertFile(); EOF %>
Version data entries
54 entries across 54 versions & 1 rubygems