System.register([],(function(){"use strict";return{execute:function(){ /*! * @plugin @tinymce-plugin/tp-indent2em * @version 0.0.1 (2022-4-21) * @description 首行缩进 * @copyright (2022) Five(Li Hailong) . All rights reserved. https://github.com/tinymce-plugin/tp-indent2em */ var t,e,n;e=function(t,e){return function(n){return t.selection.selectorChangedWithUnbind(e.join(","),(function(e,i){n.setActive(parseInt(t.dom.getStyle(t.dom.getParent(i.node,"li,p,div"),"text-indent"))>0&&e)})).unbind}},n=function(t,e){t.undoManager.transact((function(){t.focus();for(var e=t.selection.getStart();"LI"!==e.nodeName&&"P"!==e.nodeName&&"DIV"!==e.nodeName&&"BODY"!==e.nodeName;)e=e.parentNode;t.dom.getStyle(e,"text-indent")?t.execCommand("tpIndent",!1,"remove"):t.execCommand("tpIndent")}))},t={name:"Indent2em",registryName:"tpIndent2em",title:"First line indent",repo:"https://github.com/tinymce-plugin/tp-indent2em",icon:''},tinymce.PluginManager.add(t.registryName,(function(i,r){return function(t,i){t.ui.registry.getAll().icons[i.registryName]||t.ui.registry.addIcon(i.registryName,i.icon),t.ui.registry.addToggleButton(i.registryName,{icon:i.registryName,tooltip:i.title,onAction:function(){return n(t)},onSetup:e(t,['*[style*="text-indent"]','*[data-mce-style*="text-indent"]'])}),t.ui.registry.addMenuItem(i.registryName,{icon:i.registryName,text:i.title,onAction:function(){return n(t)}})}(i,t),function(t,e){t.addCommand("mce".concat(e.registryName.substring(0,1).toUpperCase()+e.registryName.substring(1)),(function(){n(t)}))}(i,t),{getMetadata:function(){return{name:t.name,url:t.repo}}}}))}}}));