Skip to content

A free and opensource MarkDown editor, with the support of exporting HTML and PDF.

License

Notifications You must be signed in to change notification settings

TadavomnisT/MDEditor

Repository files navigation

MDEditor

MDEditor-Logo

A free and opensource MarkDown editor, with the support of exporting HTML and PDF.

Installation

Automatic installation and running in GNU/Linux:

Installing Requirements:

  • php : e.g install with sudo apt install php
  • php-mbstring extention: e.g install with sudo apt install php-mbstring or uncomment extention=php_mbstring.dll in php.ini file for Windows.

Installing Project:

git clone https://github.com/TadavomnisT/MDEditor.git
cd MDEditor
chmod +x start_gui.sh

Running GUI:

./start_gui.sh

Installing and running manually:

  • Install the requirements:
sudo apt install php
sudo apt install php-mbstring
  • Download the source-code:
git clone https://github.com/TadavomnisT/MDEditor.git
  • Start GUI:
cd MDEditor
php -S 127.0.0.1:8989

Then open the url http://127.0.0.1:8989/ with a browser.

  • Using as library:

Just include MDEditor.php and use it:

require_once "MDEditor.php";
$mde = new MDEditor;

Screenshots

  • Desktop GUI:

image image

  • Resposive Mobile GUI:

image image

Library API

Please refer to ./test directory for more examples.

<?php

require_once "MDEditor.php";
$mde = new MDEditor;

$mde->setDocumentStyle("light");
$html = $mde->md2html( "./tests/sample.md" );
file_put_contents("./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".html", $html);
$pdf = $mde->html2pdf( "./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".html" );
file_put_contents("./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".pdf", $pdf);

$mde->setDocumentStyle("dark_black");
$html = $mde->md2html( "./tests/sample.md" );
file_put_contents("./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".html", $html);
$pdf = $mde->html2pdf( "./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".html" );
file_put_contents("./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".pdf", $pdf);

$mde->setDocumentStyle("toggle_darkmodeblack_dark");
$html = $mde->md2html( "./tests/sample.md" );
file_put_contents("./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".html", $html);
$pdf = $mde->html2pdf( "./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".html" );
file_put_contents("./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".pdf", $pdf);

$mde->setDocumentWidth(960);

$mde->setDocumentStyle("toggle_darkmodegray_white");
$html = $mde->md2html( "./tests/sample.md" );
file_put_contents("./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".html", $html);
$pdf = $mde->html2pdf( "./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".html" );
file_put_contents("./tests/test_" . $mde->getDocumentStyle() . $mde->getDocumentWidth() . ".pdf", $pdf);
?>

Todo-List

  • Add support of Mediawiki
  • Add Sizes for html in GUI
  • Add support of Hebrew
  • Make Headings HyperLink-able by HTML#
  • Fix HTML code and table color problems
  • Add font Embedding feature
  • Add darkmode for GUI
  • Add Drag/Drop option for GUI
  • Add Upload option for GUI

Available document styles

Available document styles:
light
light_960px
dark_black
dark_black_960px
dark_gray
dark_gray_960px
toggle_darkmodeblack_white
toggle_darkmodeblack_white_960px
toggle_darkmodegray_white
toggle_darkmodegray_white_960px
toggle_darkmodeblack_dark
toggle_darkmodeblack_dark_960px
toggle_darkmodegray_dark
toggle_darkmodegray_dark_960px

Acknowledgements

This project is powered by:

Inspiration:

Contributors:

License:

  • GPLv3

About

A free and opensource MarkDown editor, with the support of exporting HTML and PDF.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages