diff --git a/README.md b/README.md index 3498e34..74b7b0d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This is a plugin for the TinyMCE that has been packaged to be easy to install an ### TinyMCE Configuration After installing Slash Tools go to the Joomla Plugin Manager on the System dashboard and open the Editor - TinyMCE plugin. -Once open scroll to the very bottom where you will see the option to add External Plugin URLs. Enter the word **slashtools** as the Plugin Name and **/media/plg_editors_tinymce/js/plugins/slashtools/plugin.js** as the Plugin URL. +Once open scroll to the very bottom where you will see the option to add External Plugin URLs. Enter the word **slashtools** as the Plugin Name and **/media/plg_editors_tinymce/js/plugins/slashtools/plugin.min.js** as the Plugin URL. Save your change and that's all you need to do. diff --git a/slashtools.xml b/slashtools.xml index 06af45b..a8865bb 100644 --- a/slashtools.xml +++ b/slashtools.xml @@ -6,8 +6,8 @@ https://www.learnjoomla4.com Copyright Brian Teeman GNU GPL v2 or later - 1.0.1 - Jan 2023 + 1.0.2 + Sep 2024 instructions.]]> diff --git a/slashtools/plugin.js b/slashtools/plugin.js index 0950c87..a69213f 100644 --- a/slashtools/plugin.js +++ b/slashtools/plugin.js @@ -116,7 +116,7 @@ ]; editor.ui.registry.addAutocompleter("slashtools", { - ch: "/", + trigger: "/", minChars: 0, columns: 1, diff --git a/slashtools/plugin.min.js b/slashtools/plugin.min.js index 79f106d..2c02d98 100644 --- a/slashtools/plugin.min.js +++ b/slashtools/plugin.min.js @@ -4,4 +4,4 @@ * @copyright (C) 2023 - Brian Teeman * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ -!function(){"use strict";tinymce.PluginManager.add("slashtools",(function(e){var t=[{text:"H1 Heading",icon:"h1",action:()=>{e.insertContent("

H1 Heading

"),e.selection.select(e.selection.getNode())}},{text:"H2 Heading",icon:"h2",action:()=>{e.insertContent("

H2 Heading

"),e.selection.select(e.selection.getNode())}},{text:"H3 Heading",icon:"h3",action:()=>{e.insertContent("

H3 Heading

"),e.selection.select(e.selection.getNode())}},{type:"separator"},{text:"Bulleted list",icon:"unordered-list",action:()=>{e.insertContent(""),e.selection.select(e.selection.getNode())}},{text:"Ordered list",icon:"ordered-list",action:()=>{e.insertContent(""),e.selection.select(e.selection.getNode())}},{type:"separator"},{text:"Sentence",icon:"line",action:()=>{e.insertContent("Lorem ipsum dolor sit, amet consectetur adipisicing elit.")}},{text:"Paragraph",icon:"paragraph",action:()=>{e.insertContent("

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Asperiores sint officiis dolore vitae facilis praesentium non? Recusandae magni ipsa debitis quam animi libero minus enim possimus exercitationem? Architecto nobis eos, repudiandae ullam ex quos laborum commodi maiores reiciendis, omnis recusandae. Asperiores, est? Aliquid, beatae nisi? Ea sunt iusto inventore magni provident dolorem sint, maxime obcaecati illum delectus

")}},{text:"Quote",icon:"quote",action:()=>{e.execCommand("mceBlockQuote"),e.insertContent("Quotation"),e.selection.select(e.selection.getNode())}},{type:"separator"},{text:"4:3 Image",icon:"image",action:()=>{e.insertContent('')}},{text:"3:4 Image",icon:"image",action:()=>{e.insertContent('Placeholder')}},{type:"separator"},{text:"Fullscreen",icon:"fullscreen",action:()=>e.execCommand("mceFullScreen")}];return e.ui.registry.addAutocompleter("slashtools",{ch:"/",minChars:0,columns:1,fetch:function(e){const i=t.filter((t=>"separator"===t.type||-1!==t.text.toLowerCase().indexOf(e.toLowerCase()))).filter(((e,t,i)=>{const n=i[t-1],o=i[t+1];return!!("separator"!==e.type||n&&o&&"separator"!==n.type&&"separator"!==o.type)}));return new Promise((e=>{e(i.map((function(e){return{meta:e,text:e.text,icon:e.icon,value:e.text,type:e.type}})))}))},onAction:function(t,i,n,o){e.selection.setRng(i),e.execCommand("Delete"),o.action(),t.hide()}}),{getMetadata:function(){return{name:"Slashtools",url:"https://github.com/brianteeman/slashtools/blob/main/README.md"}}}}))}(); +!function(){"use strict";tinymce.PluginManager.add("slashtools",(function(e){var t=[{text:"H1 Heading",icon:"h1",action:()=>{e.insertContent("

H1 Heading

"),e.selection.select(e.selection.getNode())}},{text:"H2 Heading",icon:"h2",action:()=>{e.insertContent("

H2 Heading

"),e.selection.select(e.selection.getNode())}},{text:"H3 Heading",icon:"h3",action:()=>{e.insertContent("

H3 Heading

"),e.selection.select(e.selection.getNode())}},{type:"separator"},{text:"Bulleted list",icon:"unordered-list",action:()=>{e.insertContent(""),e.selection.select(e.selection.getNode())}},{text:"Ordered list",icon:"ordered-list",action:()=>{e.insertContent(""),e.selection.select(e.selection.getNode())}},{type:"separator"},{text:"Sentence",icon:"line",action:()=>{e.insertContent("Lorem ipsum dolor sit, amet consectetur adipisicing elit.")}},{text:"Paragraph",icon:"paragraph",action:()=>{e.insertContent("

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Asperiores sint officiis dolore vitae facilis praesentium non? Recusandae magni ipsa debitis quam animi libero minus enim possimus exercitationem? Architecto nobis eos, repudiandae ullam ex quos laborum commodi maiores reiciendis, omnis recusandae. Asperiores, est? Aliquid, beatae nisi? Ea sunt iusto inventore magni provident dolorem sint, maxime obcaecati illum delectus

")}},{text:"Quote",icon:"quote",action:()=>{e.execCommand("mceBlockQuote"),e.insertContent("Quotation"),e.selection.select(e.selection.getNode())}},{type:"separator"},{text:"4:3 Image",icon:"image",action:()=>{e.insertContent('')}},{text:"3:4 Image",icon:"image",action:()=>{e.insertContent('Placeholder')}},{type:"separator"},{text:"Fullscreen",icon:"fullscreen",action:()=>e.execCommand("mceFullScreen")}];return e.ui.registry.addAutocompleter("slashtools",{trigger:"/",minChars:0,columns:1,fetch:function(e){const i=t.filter((t=>"separator"===t.type||-1!==t.text.toLowerCase().indexOf(e.toLowerCase()))).filter(((e,t,i)=>{const n=i[t-1],o=i[t+1];return!!("separator"!==e.type||n&&o&&"separator"!==n.type&&"separator"!==o.type)}));return new Promise((e=>{e(i.map((function(e){return{meta:e,text:e.text,icon:e.icon,value:e.text,type:e.type}})))}))},onAction:function(t,i,n,o){e.selection.setRng(i),e.execCommand("Delete"),o.action(),t.hide()}}),{getMetadata:function(){return{name:"Slashtools",url:"https://github.com/brianteeman/slashtools/blob/main/README.md"}}}}))}(); diff --git a/update/manifest.xml b/update/manifest.xml index c0f2a95..0f83897 100644 --- a/update/manifest.xml +++ b/update/manifest.xml @@ -3,9 +3,9 @@ Slash Tools Editor Plugin for TinyMCE and Joomla site - 1.0.1 + 1.0.2 - https://github.com/brianteeman/slashtools/archive/1.0.1.zip + https://github.com/brianteeman/slashtools/archive/1.0.2.zip stable