From 4d453a1866e428b35d87888b7ee92846d9e9cdd2 Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Mon, 9 Sep 2024 12:16:41 +0100 Subject: [PATCH 1/5] trigger change to use trigger instead of ch --- slashtools/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, From 899fe58b3c0896641f7e6c042922bf85b4093df7 Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Mon, 9 Sep 2024 12:17:15 +0100 Subject: [PATCH 2/5] Update plugin.min.js --- slashtools/plugin.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"}}}}))}(); From 5eb691d851ebc23cea5a9930fc0929432bb8b48a Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Mon, 9 Sep 2024 12:18:03 +0100 Subject: [PATCH 3/5] Update slashtools.xml --- slashtools.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.]]> From 11b8898e91b2372e6541bea8649d2ab5d4437a3a Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Mon, 9 Sep 2024 12:18:50 +0100 Subject: [PATCH 4/5] Update manifest.xml --- update/manifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 62f79efe343460705f95b316e9e9047a0c730997 Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Mon, 9 Sep 2024 12:19:20 +0100 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.