DocumentProcessor
Markdown/HTML rendering, RichEditor sanitization, document metadata storage (Layer 0 Foundation)
Statusβ
| Key | Value |
|---|---|
| Layer | foundation |
| Tier | L0 |
| Status | wip |
| Version | 0.9.0 |
| Price | Free (free) |
| Category | Content |
Overviewβ
Overviewβ
DocumentProcessor is the Layer 0 Foundation Plugin of multi-saas-kit, providing document storage and conversion features shared across projects (academy.how, exam.how, edutech.how).
Featuresβ
- Markdown β HTML rendering via league/commonmark with GFM
- HTML section extraction & anchor annotation for paragraph-level comments / memos / translation
- RichEditor HTML sanitizer with whitelist-based tag/attribute/style/class control and 14 dangerous tags (script/style/iframe/etc.) fully removed
- Polymorphic Document storage with auto-versioning, derived_from tracking, saas_product_id / tenant_id isolation
Usageβ
use App\Plugins\DocumentProcessor\Services\{MarkdownRenderer, DocumentRepository};
use App\Plugins\DocumentProcessor\Enums\DocumentFormat;
$html = app(MarkdownRenderer::class)->render($markdown);
$repo = app(DocumentRepository::class);
$doc = $repo->upsertMarkdown($lesson, $markdown);
$active = $repo->findActiveFor($lesson, DocumentFormat::HTML);
Implementing DocumentableInterfaceβ
use App\Plugins\DocumentProcessor\Contracts\DocumentableInterface;
class Lesson extends Model implements DocumentableInterface
{
public function getSaasProductId(): ?int { return $this->saas_product_id; }
public function getTenantId(): ?int { return $this->tenant_id; }
}
Dependenciesβ
The following plugins depend on DocumentProcessor:
- Annotation β learner annotations (uses data-anchor)
- Reader β learner viewer
- StagePipeline β AI content generation pipeline
- AiSvg β AI SVG visual asset generation
Licenseβ
MIT
Demosβ
- Platform κ΄λ¦¬μ ν¨λμμ λ©ν νμΈ π Login required
- μ¬μ© μμ (PHP)
π View on Plugin Store: store.codebase.how/plugins/document-processor