markdown-code-for-wordpress icon indicating copy to clipboard operation
markdown-code-for-wordpress copied to clipboard

Convert markdown on post save instead of display

Open sheabunge opened this issue 10 years ago • 1 comments

Perhaps instead of simply filtering the_content to convert markdown tags when the post content is displayed on the front end, the tags could be converted when a post is saved instead. This way the posts will still work if this plugin is removed, and the post will be formatted correctly in the visual editor.

This would involve a small change: use the content_save_pre filter for mdc_the_content instead of the the_content filter.

sheabunge avatar Oct 09 '15 05:10 sheabunge

@sheabunge This was the initial way the plugin worked, but some of the people who I showed it to in a pre-release weren't fans of that because if they ever wanted to uninstall the plugin, they may have wanted to replace it with another Markdown plugin.

But this has spurred another idea: Maybe I could just release two versions of this particular plugin. One that saves it to the database and one that parses pre-page load.

Thoughts?

tommcfarlin avatar Oct 09 '15 20:10 tommcfarlin