jodit-pro
Version:
PRO Version of Jodit Editor
2 lines (1 loc) • 1.98 kB
JavaScript
var r=Object.defineProperty;var a=(t,e)=>r(t,"name",{value:e,configurable:!0});import o from"./icon.svg.js";import{Config as s}from"jodit/esm/config.js";import{htmlspecialchars as l}from"jodit/esm/core/helpers/html/htmlspecialchars.js";s.prototype.controls.pasteCode={icon:o,tooltip:"Paste code",command:"pasteCode"},s.prototype.pasteCode={globalHighlightLib:!1,canonicalLanguageCode(t){switch(t){case"ts":return"typescript";case"js":return"javascript";case"markup":return"html"}return t},highlightLib:{beforeLibLoad(){window.Prism=window.Prism||{},window.Prism.manual=!0},highlight(t,e){return typeof Prism<"u"?Prism.highlight(t,Prism.languages[e]||Prism.languages.plain,e):l(t)},isLangLoaded(t){return t==="html"?!0:typeof Prism<"u"?!!Prism.languages[t]:!1},js:["https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js","https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"],langUrl:a(t=>`https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-${t}.min.js`,"langUrl"),css:["https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css"]},defaultLanguage:"html",insertTemplate:a((t,e,i)=>`<pre class="language-${e}">${l(i)}</pre>`,"insertTemplate"),languages:[{value:"plaintext",text:"Plain"},{value:"html",text:"HTML/XML"},{value:"bash",text:"Bash"},{value:"php",text:"PHP"},{value:"javascript",text:"JavaScript"},{value:"typescript",text:"TypeScript"},{value:"jsx",text:"JSX"},{value:"java",text:"Java"},{value:"css",text:"CSS"},{value:"php",text:"PHP"},{value:"ruby",text:"Ruby"},{value:"python",text:"Python"},{value:"java",text:"Java"},{value:"c",text:"C"},{value:"csharp",text:"C#"},{value:"cpp",text:"C++"},{value:"sql",text:"SQL"},{value:"docker",text:"Docker"},{value:"http",text:"HTTP"},{value:"ini",text:"INI"},{value:"yaml",text:"YAML"},{value:"json",text:"JSON"},{value:"json5",text:"JSON5"},{value:"makefile",text:"Makefile"},{value:"swift",text:"Swift"}],dialog:{width:700,height:600}};