Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla5/media/system/js/editors/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla5/media/system/js/editors/editors.min.js

import{JoomlaEditorDecorator as i,JoomlaEditorButton as
n}from"editor-api";import c from"joomla.dialog";/**
 * @copyright  (C) 2023 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */if(!window.Joomla)throw new Error("JoomlaEditors API require Joomla
to be
loaded.");Joomla.editors=Joomla.editors||{},Joomla.editors.instances=new
Proxy({},{set(o,e,t){return t instanceof
i||(t.getId=()=>e,console.warn("Legacy editors is deprecated.
Register the editor instance with
JoomlaEditor.register().",e,t)),o[e]=t,!0},get(o,e){return
console.warn("Direct access to Joomla.editors.instances is deprecated.
Use JoomlaEditor.getActive() or JoomlaEditor.get(id) to retrieve the editor
instance."),o[e]}}),n.registerAction("insert",(o,e)=>{const
t=e.content||"";o.replaceSelection(t)}),n.registerAction("modal",(o,e)=>{if(e.src&&e.src[0]!=="#"&&e.src[0]!=="."){const
a=e.src.indexOf("http")===0?new URL(e.src):new
URL(e.src,window.location.origin);a.searchParams.set("editor",o.getId()),a.searchParams.has("e_name")&&a.searchParams.set("e_name",o.getId()),e.src=a.toString()}const
t=new
c(e),r=a=>{a.origin===window.location.origin&&(a.data.messageType==="joomla:content-select"?(o.replaceSelection(a.data.html||a.data.text),t.close()):a.data.messageType==="joomla:cancel"&&t.close())};window.JoomlaExpectingPostMessage=!0,window.addEventListener("message",r),t.addEventListener("joomla-dialog:close",()=>{delete
window.JoomlaExpectingPostMessage,window.removeEventListener("message",r),Joomla.Modal.setCurrent(null),t.destroy()}),Joomla.Modal.setCurrent(t),t.show()});const
l="[data-joomla-editor-button-action]",d="joomlaEditorButtonAction",s="joomlaEditorButtonOptions";document.addEventListener("click",o=>{const
e=o.target.closest(l);if(!e)return;const
t=e.dataset[d],r=e.dataset[s]?JSON.parse(e.dataset[s]):{};t&&n.runAction(t,r,e)});