=== Markup Markdown === Tags: Editor, Markdown Stable Tag: 3.7.2 Version: 3.7.2 Requires at least: 4.9 Tested up to: 6.6.2 Requires PHP: 5.6.0 License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl-3.0.html#license-text Donate Link: https://ko-fi.com/peterpower594 Disable Wordpress's native Gutenberg or TinyMCE editor in favor of a Markdown editor. == Description == This plugin replaces the Gutenberg block editor (or the classic TinyMCE) on the edit screen with [EasyMDE](https://github.com/Ionaru/easy-markdown-editor), a markdown editor based on CodeMirror. The content is saved with the markdown syntax in the database and is rendered on the frontend via wordpress native filters thanks to the [Parsedown](https://parsedown.org) PHP library. This extension rocks: - v3.7: Adding support for selective heading levels - v3.6: Performance improvements with spellchecker and suggestions - v3.5: Adding support for right-to-left alphabets like Arabic, Hebrew, or Persian - v3.4: Adding support for categories, tags and taxonomies description field (Woocommerce and REST API compatible) - v3.3: Support for multiple html attributes, compatibility with acf_form added for the frontend, basic compatibility with block styles - v3.2: Support to enable markdown only for custom fields - v3.1: Side preview panel fixed - v3.0: Choose and sort the default toolbar buttons - v2.6: Sticky toolbar with the editor - v2.6: Possible to disable OP Cache - v2.5: Video playlist support added - v2.3: New beta interface - v2.2: Possible to enable or disable specific addons - v2.1: Gallery shortcode support - v2.0: ACF markdown field support - v1.9: Multilingual spell checking support - v1.7: Disable markdown for specific custom post type - v1.4: Extra markdown syntax added - v1.3: Static cache files with OP Cache enabled by default - v1.2: Autoconvert Youtube & Vimeo links to iframes - v1.1: Support with lightbox and masonry for the gallery layout That's pretty all you should know. It's under active development, keep in touch and feel free [to drop a line on the forum](https://wordpress.org/support/plugin/markup-markdown/), [to let a rating](https://wordpress.org/support/plugin/markup-markdown/reviews/) or even support me by buying a coffee ! == Frequently Asked Questions == = How to install = The same as usual: 1. Just download and upload the zip file to your wordpress instance. Or install directly by simply searching from the WP plugin panel. 2. Activate the extension. All done! That's all you should do. = Is it still compatible with Gutenberg or any other builder? **Yes but you can't use both at the same time ;-)** Data are saved as pure markdown code in the database, for the other builders on the market data are saved as HTML or custom markups like shortcodes. Currently data are still saved but won't be converted or rendered correctly if you revert back or switch between editors. = Can I switch between editors or allow the markdown editor for specific users ? = **Yes, please keep in mind it's a global switch for every user. You need to stick to one editor with one post type.** Any block editor will be disabled for **all the users** of your Wordpress instance. _filters_ are available to disable the markdown editor for specific custom post types at a global level. For example you can do a setup to use _Divi_ or _Elementor_ to edit your pages and _Markdown_ to edit your blog'posts. Please refer to the forum to know how to do it. = Can I use it with custom fields? (Or within my theme) = Sure, developers & designers can access the public properties & methods of the instance inside their templates through the global _mmd_ function. For example let's say you want to use it with a custom field called 'foo_bar'. You can use something like that: `markdown2html( get_post_meta( get_the_ID(), 'foo_bar' , true ) ); ?>` Disclaimer: with the plugin Advanced Custom Field (ACF), HTML content has been sanitized since v6.2.5. If you need to render iframes or others elements, instead of using: `` use `markdown2html( get_field( 'my_custom_field' ) ); ?>` = What's the deal with the beta interface? = The default editor is based on EasyMDE so you can write in markdown and use Wordpress feature at the same time. The side panel preview mode has been fixed since 3.0. The beta interface is based on SummerNote, a jQuery WYSIWYG Engine. _The beta interface has been removed since 3.0 and will be available as a separate addon._ It's a custom version so you can get a live rendering when typing your content or adding medias. It's not perfect, it's still working well but for now you will have to modify the code on your own (builder or database) if something goes wrong. To find out more check my article here: https://www.markup-markdown.com/blog/wordpress-plugins/dynamic-input-method-markdown/ = Accessibility = The current version is based on components that are not compatible with assistive devices like screen readers. Several available alternative plugins could cover the gap while I'm working on a new interface. Thank you for your patience and your understanding. == Changelog == = 3.7.2 = Quick patch to add missing stylesheets assets since 3.7.0 = 3.7.1 = Quick patch to add an option to preserve spaces at the beginning of line = 3.7.0 = New feature: - Adding support for selective heading levels You can now prevent the use of specific headings like H1 in the WYSIWYG for better SEO and friendly theme compatibility = 3.6.6 = Bug fix: - Removing unwanted spaces (trim) with the headlines = 3.6.5 = Quick bug fix: - Patch the PHP error with existing instances when the spell checker is enabled and an extra dictionary file is missing = 3.6.4 = Bug fix: - Adding basic strict mode back with Parsedown Following the markdown recommendations, #headlines text (without the space after the # sign) are not rendered as headlines anymore. Improvement: - Keeping current hooks but adding a few tweaks earlier in the frontend so markdown can be triggered with themes built for Gutenberg. *get_header* action won't be fired on the frontend with most of the themes using the blocks editor, *wp_head* will be too late to setup filters as content related data are prepared earlier in the rendering process. = 3.6.3 = Improvement: - Adding possibility to load an extra dictionary file that could be used to add your own custom words in the future = 3.6.2 = Improvement: - The spellchecker based on Typojs is shared between multiple code mirror instances (Performance boost as one unique checker is used even if you are working with several custom markdown fields) = 3.6.1 = Improvements: - _Disable Emojis_ added as an autoplug - Rules added to exclude emoticons from the spellchecker = 3.6.1 = Improvement: - Custom code mirror spellchecker updated One unique event *CodeMirrorDictionariesReady* will be dispatched once all the dictionaries are loaded *CodeMirrorSpellCheckerReady* will be fired when the spellchecker is ready to be used and attached to a code mirror instance. = 3.6.0 = Improvement: - Primary scripts now minified as a unique bundle file By default _builder.min.js_ is loaded. If _WP_DEBUG_ is enabled, separate minified module scripts will be used. If _SCRIPT_DEBUG_ or _MMD_SCRIPT_DEBUG_ is turned on, the unminified version available of a module will be loaded when available = 3.5.0 = New feature: - Adding buttons and support for RTL Improvements: - Better support with multisite - Hooks more friendly with plugins like CPT UI (Custom Post Type) and ACF (Advanced Custom Field) = 3.4.2 = Improvements: - Basic internationalization strings added - French version released as local for now Bug fix: - Adding css namespace for the toolbar buttons to avoid collision with Bootstrap on the frontend = 3.4.1 = Improvements: - Adding missing filters in the REST Api - Adding a plug for the description field with Woocommerce templates Bug fix: - Undefined variable in array with WP Geshi = 3.4.0 = Improvement: - Adding markdown support by default for category, tags, and term descriptions = 3.3.8 = Bug fix: - Activate markdown filters on the front page / home page as well = 3.3.7 = Bug fix: - Patch a PHP warning if the align attribute was missing Improvement - Adding a few missing styles inside the preview panel = 3.3.6 = Bug fix: - Fixing PHP error with undefined array key = 3.3.5 = Bug fix: - Adding a whitelist on the REST hook to allow the rendering of markdown with REST content = 3.3.4 = Bug fixes: - Removing blank icon in the toolbar when the spell checker addon was disabled - Fixing the case when a custom image size was overriden by wordress predefined size = 3.3.3 = Bug fix: - Patch a cache issue with (my) shared webhosting with the WP Geshi AutoPlug = 3.3.2 = Bug fix: - Patch a javascript error with an undefined variable = 3.3.1 = Improvements: - Markdown extra patches added to support HTML multi-attributes `## Headline {#h2 .short .great lang=en}` => `