cheinisch/markdown-editor

It's a simple Markdown editor (HTML/JS/CSS) packaged for easy embedding in PHP apps via Composer.

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/cheinisch/markdown-editor

v0.0.4.1 2025-09-21 16:26 UTC

This package is auto-updated.

Last update: 2025-09-26 05:05:06 UTC


README

It’s a simple Markdown editor (HTML/JS/CSS) packaged for easy embedding in PHP apps via Composer.

editor

Editor with active preview on the right side

With active preview

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>