generated from MokoConsulting/Template-Joomla
57 lines
2.2 KiB
Markdown
57 lines
2.2 KiB
Markdown
# MokoSuiteEditor
|
|
|
|
Advanced WYSIWYG editor for Joomla 6 built on TinyMCE 7. Media management, source editing, role-based profiles.
|
|
|
|
## Quick Reference
|
|
|
|
| Field | Value |
|
|
|---|---|
|
|
| **Package** | `pkg_mokosuiteeditor` |
|
|
| **Layer** | Standalone (optional CRM integration) |
|
|
| **Language** | PHP 8.3+ / JavaScript (TinyMCE 7, CodeMirror 6) |
|
|
| **Branch** | develop on `dev`, merge to `main` (protected) |
|
|
| **Wiki** | [MokoSuiteEditor Wiki](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteEditor/wiki) |
|
|
|
|
## Architecture
|
|
|
|
Joomla **package** (`pkg_mokosuiteeditor`) — standalone editor plugin, no MokoSuite dependencies.
|
|
|
|
### Package Contents
|
|
- `plg_editors_mokosuiteeditor` — core TinyMCE 7 editor
|
|
- `plg_editors-xtd_mokosuiteeditor_media` — media manager button
|
|
- `plg_editors-xtd_mokosuiteeditor_link` — link manager button
|
|
- `plg_editors-xtd_mokosuiteeditor_code` — source code button (CodeMirror 6)
|
|
|
|
### Optional Integrations
|
|
- MokoSuiteCRM — contact cards, product cards, merge fields in templates
|
|
- MokoSuiteCreate — asset library integration
|
|
- Uses `class_exists()` checks to gracefully degrade
|
|
|
|
### Key Patterns
|
|
- Editor profiles control toolbar/features per Joomla user group
|
|
- Media uploads auto-resize and convert to WebP
|
|
- Source editor uses CodeMirror 6 with HTML syntax highlighting
|
|
- TinyMCE 7 loaded from `media/plg_editors_mokosuiteeditor/` (no CDN)
|
|
|
|
## Source Directory
|
|
|
|
- `source/pkg_mokosuiteeditor.xml` — package manifest
|
|
- `source/packages/` — sub-extensions
|
|
|
|
## Rules
|
|
|
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
|
- **Attribution**: `Authored-by: Moko Consulting`
|
|
- **Workflow directory**: `.mokogitea/`
|
|
- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files
|
|
- **Standards**: [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoCLI/wiki)
|
|
- **Changelog**: `[Unreleased]` only — release system assigns versions
|
|
- **No upstream references**: never reference competitor editor products
|
|
|
|
## Coding Standards
|
|
|
|
- PHP 8.3+ / Joomla 6 patterns
|
|
- `$this->getDatabase()` in models, `Factory::getContainer()->get(DatabaseInterface::class)` in helpers
|
|
- TinyMCE config built in PHP, passed as JSON to `tinymce.init()`
|
|
- No inline JavaScript — all JS in dedicated files under `media/`
|