diff --git a/source/packages/plg_editors_mokosuiteeditor/language/en-GB/plg_editors_mokosuiteeditor.ini b/source/packages/plg_editors_mokosuiteeditor/language/en-GB/plg_editors_mokosuiteeditor.ini new file mode 100644 index 0000000..9aebf26 --- /dev/null +++ b/source/packages/plg_editors_mokosuiteeditor/language/en-GB/plg_editors_mokosuiteeditor.ini @@ -0,0 +1,15 @@ +PLG_EDITORS_MOKOSUITEEDITOR="Editors - MokoSuite Editor" +PLG_EDITORS_MOKOSUITEEDITOR_DESC="Advanced WYSIWYG editor built on TinyMCE 7 with CodeMirror 6 source editing, role-based profiles, and integrated media management." +PLG_EDITORS_MOKOSUITEEDITOR_PROFILES="Editor Profiles" +PLG_EDITORS_MOKOSUITEEDITOR_DEFAULT_PROFILE="Default Profile" +PLG_EDITORS_MOKOSUITEEDITOR_ADMIN_TOOLBAR="Admin Toolbar Layout" +PLG_EDITORS_MOKOSUITEEDITOR_AUTHOR_TOOLBAR="Author Toolbar Layout" +PLG_EDITORS_MOKOSUITEEDITOR_BASIC_TOOLBAR="Basic Toolbar Layout" +PLG_EDITORS_MOKOSUITEEDITOR_MEDIA="Media Settings" +PLG_EDITORS_MOKOSUITEEDITOR_MAX_UPLOAD_MB="Max Upload Size (MB)" +PLG_EDITORS_MOKOSUITEEDITOR_AUTO_RESIZE_WIDTH="Auto Resize Width (px)" +PLG_EDITORS_MOKOSUITEEDITOR_WEBP_CONVERSION="Auto Convert to WebP" +PLG_EDITORS_MOKOSUITEEDITOR_WEBP_QUALITY="WebP Quality" +PLG_EDITORS_MOKOSUITEEDITOR_SOURCE_EDITING="Source Editing" +PLG_EDITORS_MOKOSUITEEDITOR_ENABLE_SOURCE_EDITING="Enable Source Editing" +PLG_EDITORS_MOKOSUITEEDITOR_CODEMIRROR_THEME="CodeMirror Theme" diff --git a/source/packages/plg_editors_mokosuiteeditor/language/en-GB/plg_editors_mokosuiteeditor.sys.ini b/source/packages/plg_editors_mokosuiteeditor/language/en-GB/plg_editors_mokosuiteeditor.sys.ini new file mode 100644 index 0000000..2bd60cb --- /dev/null +++ b/source/packages/plg_editors_mokosuiteeditor/language/en-GB/plg_editors_mokosuiteeditor.sys.ini @@ -0,0 +1,2 @@ +PLG_EDITORS_MOKOSUITEEDITOR="Editors - MokoSuite Editor" +PLG_EDITORS_MOKOSUITEEDITOR_DESC="Advanced WYSIWYG editor built on TinyMCE 7 with CodeMirror 6 source editing, role-based profiles, and integrated media management." diff --git a/source/packages/plg_editors_mokosuiteeditor/mokosuiteeditor.xml b/source/packages/plg_editors_mokosuiteeditor/mokosuiteeditor.xml new file mode 100644 index 0000000..5ebceb3 --- /dev/null +++ b/source/packages/plg_editors_mokosuiteeditor/mokosuiteeditor.xml @@ -0,0 +1,70 @@ + + + Editors - MokoSuite Editor + mokosuiteeditor + Moko Consulting + 2026-06-23 + Copyright (C) 2026 Moko Consulting. All rights reserved. + GPL-3.0-or-later + hello@mokoconsulting.tech + https://mokoconsulting.tech + 01.00.10 + 8.3 + PLG_EDITORS_MOKOSUITEEDITOR_DESC + Moko\Plugin\Editors\MokoSuiteEditor + + src + services + language + sql + + + en-GB/plg_editors_mokosuiteeditor.ini + en-GB/plg_editors_mokosuiteeditor.sys.ini + + + + sql/install.mysql.sql + + + + + sql/uninstall.mysql.sql + + + + +
+ + + + + + + + +
+
+ + + + + + + +
+
+ + + + + + + + + + +
+
+
+
diff --git a/source/packages/plg_editors_mokosuiteeditor/services/provider.php b/source/packages/plg_editors_mokosuiteeditor/services/provider.php new file mode 100644 index 0000000..518ca26 --- /dev/null +++ b/source/packages/plg_editors_mokosuiteeditor/services/provider.php @@ -0,0 +1,34 @@ +set( + PluginInterface::class, + function (Container $container) { + $dispatcher = $container->get(DispatcherInterface::class); + $plugin = new MokoSuiteEditor($dispatcher, (array) PluginHelper::getPlugin('editors', 'mokosuiteeditor')); + $plugin->setApplication(Factory::getApplication()); + + return $plugin; + } + ); + } +}; diff --git a/source/packages/plg_editors_mokosuiteeditor/sql/install.mysql.sql b/source/packages/plg_editors_mokosuiteeditor/sql/install.mysql.sql new file mode 100644 index 0000000..4c5a61e --- /dev/null +++ b/source/packages/plg_editors_mokosuiteeditor/sql/install.mysql.sql @@ -0,0 +1,56 @@ +-- +-- MokoSuite Editor Tables +-- + +CREATE TABLE IF NOT EXISTS `#__mokosuiteeditor_profiles` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `title` VARCHAR(255) NOT NULL, + `user_groups` JSON DEFAULT NULL, + `toolbar_config` JSON DEFAULT NULL, + `allowed_tags` TEXT DEFAULT NULL, + `source_editing` TINYINT NOT NULL DEFAULT 1, + `media_upload` TINYINT NOT NULL DEFAULT 1, + `max_upload_mb` INT UNSIGNED NOT NULL DEFAULT 10, + `auto_resize_width` INT UNSIGNED NOT NULL DEFAULT 1920, + `webp_conversion` TINYINT NOT NULL DEFAULT 1, + `published` TINYINT NOT NULL DEFAULT 1, + `ordering` INT NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_published` (`published`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `#__mokosuiteeditor_templates` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `title` VARCHAR(255) NOT NULL, + `content` TEXT NOT NULL, + `category` VARCHAR(100) NOT NULL DEFAULT '', + `thumbnail` VARCHAR(500) NOT NULL DEFAULT '', + `published` TINYINT NOT NULL DEFAULT 1, + `ordering` INT NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_category` (`category`), + KEY `idx_published` (`published`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `#__mokosuiteeditor_media_presets` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `title` VARCHAR(255) NOT NULL, + `max_width` INT UNSIGNED NOT NULL DEFAULT 1920, + `max_height` INT UNSIGNED NOT NULL DEFAULT 1080, + `quality` INT UNSIGNED NOT NULL DEFAULT 85, + `format` ENUM('webp','jpg','png') NOT NULL DEFAULT 'webp', + `created` DATETIME NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Default profiles +-- + +INSERT INTO `#__mokosuiteeditor_profiles` (`title`, `user_groups`, `toolbar_config`, `allowed_tags`, `source_editing`, `media_upload`, `max_upload_mb`, `auto_resize_width`, `webp_conversion`, `published`, `ordering`, `created`) +VALUES +('Admin', '[8]', '{"toolbar": "undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table | align lineheight | numlist bullist indent outdent | emoticons charmap | removeformat | code fullscreen"}', NULL, 1, 1, 50, 1920, 1, 1, 1, NOW()), +('Author', '[3,4]', '{"toolbar": "undo redo | blocks | bold italic underline | link image | align | numlist bullist | removeformat | code"}', '