markdown-to-html-cli
Version:
Command line tool generates markdown as html.
4 lines (3 loc) • 1.21 kB
TypeScript
import { Element } from 'hast';
export declare const copyScript = "/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */\n!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){\"use strict\";return function(e,t){const o=document.createElement(\"textarea\");o.value=e,o.setAttribute(\"readonly\",\"\"),o.style={position:\"absolute\",left:\"-9999px\"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand(\"copy\")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));\n\nfunction copied(target, str) {\n target.classList.add('active');\n copyTextToClipboard(target.dataset.code, function() {\n setTimeout(() => {\n target.classList.remove('active');\n }, 2000);\n });\n}";
export declare function copyElement(str?: string): Element;