cheinisch/markdown-editor
最新稳定版本:v0.0.4.1
Composer 安装命令:
composer require cheinisch/markdown-editor
包简介
It's a simple Markdown editor (HTML/JS/CSS) packaged for easy embedding in PHP apps via Composer.
README 文档
README
It’s a simple Markdown editor (HTML/JS/CSS) packaged for easy embedding in PHP apps via Composer.
Editor with active preview on the right side
Requirements
- PHP >= 8.1
- Composer
Installation
composer require cheinisch/markdown-editor
Usage
Required functions
Import the class
use cheinisch\MarkdownEditor\MarkdownEditor;
Loading CSS in the head
<?= MarkdownEditor::renderHeadAssets(); ?>
Loading JS in the footer area
<?= MarkdownEditor::renderFootAssets(); ?>
Loading the editor in the main area
<?= MarkdownEditor::render(); ?>
Demo Page
Simple PHP HTML Layout with required functions
<?php
require __DIR__ . '/vendor/autoload.php';
use cheinisch\MarkdownEditor\MarkdownEditor;
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My Editor</title>
<?= MarkdownEditor::renderHeadAssets(); ?> <!-- CSS -->
</head>
<body>
<?= MarkdownEditor::render(); ?>
This is a dummy text
<?= MarkdownEditor::renderFootAssets(); ?> <!-- JS at the end -->
</body>
</html>
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-21