{"id":22993718,"url":"https://github.com/schumacherfm/magento-markdown","last_synced_at":"2025-08-13T22:31:10.673Z","repository":{"id":9505486,"uuid":"11399624","full_name":"SchumacherFM/Magento-Markdown","owner":"SchumacherFM","description":"Markdown as module for Magento! Replaces the TinyMCE editor. Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).","archived":false,"fork":false,"pushed_at":"2018-06-08T18:10:41.000Z","size":1025,"stargazers_count":63,"open_issues_count":0,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-02T07:21:51.682Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SchumacherFM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-14T07:10:17.000Z","updated_at":"2024-04-25T20:30:06.000Z","dependencies_parsed_at":"2022-09-22T14:41:22.775Z","dependency_job_id":null,"html_url":"https://github.com/SchumacherFM/Magento-Markdown","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/SchumacherFM/Magento-Markdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchumacherFM%2FMagento-Markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchumacherFM%2FMagento-Markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchumacherFM%2FMagento-Markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchumacherFM%2FMagento-Markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SchumacherFM","download_url":"https://codeload.github.com/SchumacherFM/Magento-Markdown/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchumacherFM%2FMagento-Markdown/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270328974,"owners_count":24565769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T05:14:12.531Z","updated_at":"2025-08-13T22:31:10.313Z","avatar_url":"https://github.com/SchumacherFM.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Magento: Mage Markdown Module [M↓]\n==================================\n\n![image](https://raw.github.com/SchumacherFM/Magento-Markdown/master/logo/magento-markdown.png)\n\nMarkdown is a text-to-HTML conversion tool for web writers. Markdown\nallows you to write using an easy-to-read, easy-to-write plain text\nformat, then convert it to structurally valid XHTML (or HTML).\n\n- Full support of [Markdown Extra](http://michelf.ca/projects/php-markdown/extra/)\n- Renders all CMS pages and all CMS blocks (Mage_Cms_Block_Block and Mage_Cms_Block_Widget_Block)\n- Renders every transactional email as Markdown (or MD Extra)\n- Rendering of catalog product and category short and long description fields have to be implemented in the phtml files by yourself.\n- Integrates the [EpicEditor](http://epiceditor.com): split fullscreen editing, live previewing, automatic draft saving and offline support. [1]\n- Drag'n'Drop, Copy'n'Past and classical file upload of images supported in textarea fields. [Automatic image uploading](https://developer.mozilla\n.org/en-US/docs/Web/API/FileReader) integrated (\u003e=IE10, Safari 6.0.2, FX3.6, Chrome 7, Opera 12.02)\n- Converting of HTML into Markdown. Client side via JavaScript.\n- Preview mode either via on-the-fly of rendered markdown or its HTML or Live Preview of the current page by choosing the approriate store view\n- Set permission per role under System -\u003e Permissions -\u003e Role that user can see different parts of the Markdown Editor\n\nFull documentation of Markdown's syntax is available on [John's Markdown page](http://daringfireball.net/projects/markdown/)\n\n[1] Will be maybe removed in future versions\n\nWhy do I need this?\n-------------------\n\nBecause you want to get rid of the TinyMCE and force your customer to use easy and limited syntax.\n\nYou can also edit your markdown text with external editors:\n\n#### Mac OS X\n\n- [Mou The missing Markdown editor for web developers](http://mouapp.com/)\n- [Lightpaper for Mac](http://clockworkengine.com/lightpaper-mac/)\n\n#### All platforms\n\n- PhpStorm\n- Sublime Text\n- Cloud based: [StackEdit](http://benweet.github.io/stackedit/)\n\n#### Windows\n\n- [MarkdownPad is a full-featured Markdown editor for Windows](http://markdownpad.com/)\n\n### Mashable: [78 Tools for Writing and Previewing Markdown](http://mashable.com/2013/06/24/markdown-tools/)\n\n\nConfiguration\n-------------\n\nAll options can be set per store view.\n\n- Enable or disable Markdown parser\n- Enable or disable Markdown extra parser\n- Set permissions per role in System -\u003e Permissions -\u003e Roles\n- Set Markdown detection tag\n- Hide Image Insert button\n- Enable/Disable markdown rendering in email template\n- HTML Source Preview Style CSS, choose one of ~20 different themes\n- Markdown Preview Style CSS, choose one of 9 different themes\n- Configure the CSS Style for all three preview iFrames\n- Add path to css file if using in transactional emails\n- Enable or disable Markdown EpicEditor (Default disabled)\n- Enable or disable loading of the EpicEditor via click in a textarea field\n- Full configuration for Markdown EpicEditor - add a JSON object in the System -\u003e Configuration section\n- Defining a custom upload folder for image upload. This folder will be created automatically and recursively\n- Enable or disable HTML to Markdown converter reMarked.js\n- Full configuration for converter reMarked.js. Add a JSON object in the System -\u003e Configuration section\n- Integrate Markdown into your own module by adding the layout handle into the System -\u003e Configuration section\n\nEvery field which contains Markdown syntax must contain that detection tag otherwise it will not be parsed.\n\nFile upload via Drag'n'Drop works only if you click on the textarea field once. During drag mode a green border will show that file upload\nvia Drag'n'Drop is available. If you do not see that border during a drag then there will be no file upload.\n\nDemo Content: [http://daringfireball.net/projects/markdown/syntax.text](http://daringfireball.net/projects/markdown/syntax.text)\n\nBugs\n----\n\n#### CSS in transactional emails\n\nCSS is included in the transactional emails in their style tag. Maybe some mail providers removes that style tag\nor cannot render it. So maybe there has to be some transformation that the CSS will be added\ninto each html tag attribute: style.\n\n```\n\t\u003ch1 style=\"font-size...\"\u003e\u003c/h1\u003e\n```\n\nDeveloper Usage\n---------------\n\nAnywhere in a .phtml file you can access the renderer via:\n\n```\n\u003c?php echo Mage::helper('markdown')-\u003erender($_description, [array $options] ); ?\u003e\n```\n\nIf you need support for Magento Variables, including Images, you should render the original Magento output. For example, in catalog/product/view/description.phtml, one would use the following code to render markdown, including images and/or other Magento variables: \n\n```\n\u003c?php echo Mage::helper('markdown')-\u003erender($this-\u003ehelper('catalog/output')-\u003eproductAttribute($this-\u003egetProduct(), $_description, 'description')); ?\u003e\n```\n\nCatalog product and category description fields have already enabled the markdown feature in the backend. For the frontend\nyou have to implement the above mentioned code.\n\nCMS pages (instance of Mage_Cms_Model_Page) and blocks (instance of Mage_Cms_Block_Block and\nMage_Cms_Block_Widget_Block) will be rendered automatically but only if the detection tag is present.\n\nMagento Widgets and Variables will be automatically preserved and correctly rendered:\n\n```\n{{(widget|config|media|...) ... }}\n```\n\n#### Configuring the Markdown parser for custom usage\n\n```\n$instance = Mage::getModel('markdown/markdown_render');\n$renderer = $instance=\u003egetRenderer();\n$renderer-\u003eempty_element_suffix = '\u003e';\n$renderer-\u003etab_width = 5;\n$instance-\u003esetOptions(array(\n    'force'          =\u003e FALSE, // force rendering even if not markdown\n    'protectMagento' =\u003e TRUE, // protect Magento widgets/variables ...\n    'extra'          =\u003e FALSE, // force rendering of markdown extra if true\n));\necho $instance-\u003erenderMarkdown('text goes here');\n```\n\n#### Tips for parsing transactional emails with Markdown Extra\n\n- Remove body tags\n- Use ```\u003cdiv markdown=\"1\"\u003e``` including markdown=1 in other tags works not always properly\n\n#### How to integrate markdown into my module?\n\n...\n\n#### Modifying the backend\n\nYou can add an event to the Markdown observer which generates the backend view.\n\n```php\n        Mage::dispatchEvent('markdown_merge_after_element_html', array(\n            'instance' =\u003e $this,\n        ));\n```\n\nTodo\n----\n\n- For version 3.0 replace the EpicEditor with StackEdit\n- Create a version for Magento2\n\nInstallation Instructions\n-------------------------\n1. Install modman from https://github.com/colinmollenhour/modman\n2. Switch to Magento root folder\n3. `modman init`\n4. `modman clone git://github.com/SchumacherFM/Magento-Markdown.git`\n\nPlease read the great article from Vinai: [Composer installation](http://magebase.com/magento-tutorials/composer-with-magento/)\n\nAbout\n-----\n\n- Key: SchumacherFM_Markdown\n- Current Version: 2.2.0\n- [Download tarball](https://github.com/SchumacherFM/Magento-Markdown/tags)\n- Donation: [http://www.seashepherd.org/](http://www.seashepherd.org/)\n\nHistory\n-------\n\n#### 2.2.1\n\n- Fix live preview URL (Paul)\n- Fix system.xml module definition (Paul)\n- Fix #39 #42: Hidden Insert ImageButton is always hidden.\n- Fix: Custom Layout Handler does not work with array_flip #40\n\n#### 2.2.0\n\n- Update PHP Markdown Lib to version 1.4.1 (4 May 2014) For more details see [here](https://github.com/michelf/php-markdown)\n- Update reMarked.js to latest version\n- Update marked.js to latest version. Fixes some regex bugs\n\n#### 2.1.1\n\n- Update EpicEditor\n- Update marked.js to version v0.3.2\n- Update reMarked.js to latest version which fixes a lot of bugs\n- Tiny update of beautify-html.js (AMD)\n- Update highlight.js to version 8.0 http://highlightjs.org; new themes\n- Remove shortened array syntax (PHP 5.4 feature). Thanks [Dan Gibbs](https://github.com/Gibbs)!\n- Bug fix: Hide markdown in email editor when it is disabled. Thanks Paul Hachmang!\n\n#### 2.1.0\n\n- Enable/Disable markdown rendering in email template. (by Paul Hachmang)\n- Update marked.js\n- Bug fix: HTML Preview code markup\n- Bug fix: HTML preview button should be removed\n- Bug fix: When there is no content, the Preview and Live Preview tabs show incorrect request\n- Feature: Feedback and ideas after being used in the wild.\n- Feature: Settings to enable/disable Preview, Live Preview and HTML Preview tabs (See Permissions -\u003e Roles)\n- Merged Pull Request [More native-like styling](https://github.com/SchumacherFM/Magento-Markdown/pull/20)\n- Add new option for styling of the backend textarea field\n- Major changes in the backend Github Issue #18\n- Renaming of buttons\n- EpicEditor disabled by default\n- Better style for the textarea field with outer glow\n- Besides image Drag'n'Drop added file upload and copy and paste for images\n- Enhanced preview mode\n\n#### 2.0.2\n\n- Minor bug fix. Github Issue #17 (wrong module name) and #13 (reMarked.js fixed empty thead)\n\n#### 2.0.1\n\n- Minor bug fix. Github Issue #14\n\n#### 2.0.0\n\n- Major changes\n- Remove support for \u003c= IE8\n- Add [EpicEditor](http://epiceditor.com) with built in marked.js, split fullscreen editing,\n    live previewing, automatic draft saving and offline support.\n    Down side: when inserting Magento widgets, images or variables you have to turn of the editor to insert that item\n    and then turn it on. (Missing bi-directional synchronization between textarea and editor)\n- Preview of HTML source code possible even if EpicEditor is not loaded or disabled.\n- If EpicEditor is unloaded then dropping image files with direct upload is possible [HTML5 FileReader](http://bgrins.github.io/filereader.js/).\n    Due the contenteditable mode in EpicEditor the FileReader cannot be implemented, only in a textarea field ...\n- Add reMarked.js to convert HTML into Markdown. reMarked.js is fully configurable via a JSON object.\n\n#### 1.4.2\n\n- Magento Connect\n- Compatibility Magento \u003e= 1.5\n\n#### 1.4.1\n\n- Fix readme\n- Magento Connect\n\n#### 1.4.0\n\n- Update readme\n- Add modified markdown logo from [https://github.com/dcurtis/markdown-mark](https://github.com/dcurtis/markdown-mark)\n- Tiny rename to Mage Markdown due to Magento Connect guidelines\n- Live preview in CMS Editor fields (not for Markdown Extra)\n- Email Templates can have Markdown Extra mode while the default config is \"normal\" Markdown mode\n- Implementing your own renderer must implement SchumacherFM_Markdown_Model_Markdown_Interface\n\n#### 1.3.0\n\n- Backend preview for Markdown Extra via ajax loading\n\n#### 1.2.0\n\n- Use Markdown in transactional emails\n- Bug fixes\n\n#### 1.1.0\n\n- Update Markdown parser\n- Implemented Markdown extra\n\n#### 1.0.0\n\n- Initial Release\n\n\nCompatibility\n-------------\n\n- Magento \u003e= 1.5\n- php \u003e= 5.2.0\n\nThere exists the possibility that this extension may work with pre-1.5 Magento versions.\n\nSupport / Contribution\n----------------------\n\nReport a bug using the issue tracker or send us a pull request.\n\nInstead of forking I can add you as a Collaborator IF you really intend to develop on this module. Just ask :-)\n\nWe work with: [A successful Git branching model](http://nvie.com/posts/a-successful-git-branching-model/) and [Semantic Versioning 2.0.0](http://semver.org/)\n\nLicence BSD-3-Clause\n--------------------\n\n#### Magento Markdown Implementation\n\nCopyright (c) 2014 Cyrill (at) Schumacher dot fm\n\nAll rights reserved.\n\n#### PHP Markdown Lib\n\n- Copyright (c) 2004-2014 Michel Fortin\n- [http://michelf.ca](http://michelf.ca)\n- [https://github.com/michelf/php-markdown/](https://github.com/michelf/php-markdown/)\n\n#### reMarked.js\n\n- Copyright (c) 2014 Leon Sorokin / leeoniya\n- [https://github.com/leeoniya/reMarked.js](https://github.com/leeoniya/reMarked.js)\n\n#### marked.js\n\n- Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)\n- [https://github.com/chjj/marked](https://github.com/chjj/marked)\n\n#### highlight.js\n\n- Copyright (c) 2006, Ivan Sagalaev\n- [https://github.com/isagalaev/highlight.js](https://github.com/isagalaev/highlight.js)\n\n#### Markdown Styles\n\n- [http://mixu.net/markdown-styles/](http://mixu.net/markdown-styles/)\n\n#### beautify-html\n\n- Copyright (c) 2007-2014 Einar Lielmanis and contributors.\n- [https://github.com/einars/js-beautify/blob/master/js/lib/beautify-html.js](https://github.com/einars/js-beautify/blob/master/js/lib/beautify-html.js)\n\n#### EpicEditor\n\n- Copyright (c) 2011-2014, Oscar Godson (http://oscargodson.com)\n- [https://github.com/OscarGodson/EpicEditor](https://github.com/OscarGodson/EpicEditor)\n\n####  Based on Markdown\n\nCopyright (c) 2003-2005 John Gruber\n\n\u003chttp://daringfireball.net/\u003e\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n*   Redistributions of source code must retain the above copyright\n    notice, this list of conditions and the following disclaimer.\n\n*   Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the\n    documentation and/or other materials provided with the\n    distribution.\n\n*   Neither the name \"Markdown\" nor the names of its contributors may\n    be used to endorse or promote products derived from this software\n    without specific prior written permission.\n\nThis software is provided by the copyright holders and contributors \"as\nis\" and any express or implied warranties, including, but not limited\nto, the implied warranties of merchantability and fitness for a\nparticular purpose are disclaimed. In no event shall the copyright owner\nor contributors be liable for any direct, indirect, incidental, special,\nexemplary, or consequential damages (including, but not limited to,\nprocurement of substitute goods or services; loss of use, data, or\nprofits; or business interruption) however caused and on any theory of\nliability, whether in contract, strict liability, or tort (including\nnegligence or otherwise) arising in any way out of the use of this\nsoftware, even if advised of the possibility of such damage.\n\nBackend preview rendering via:\n\n * marked - a markdown parser\n * Copyright (c) 2011-2013, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/chjj/marked\n\n\nAuthor\n------\n\n[Cyrill Schumacher](https://github.com/SchumacherFM) - [My pgp public key](http://www.schumacher.fm/cyrill.asc)\n\n[@SchumacherFM](https://twitter.com/SchumacherFM)\n\nMade in Sydney, Australia :-)\n\nIf you consider a donation please contribute to: [http://www.seashepherd.org/](http://www.seashepherd.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschumacherfm%2Fmagento-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschumacherfm%2Fmagento-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschumacherfm%2Fmagento-markdown/lists"}