Here’s a simple plugin to allow both Markdown formatting and SmartyPants rendering in one plugin. You’ll have to install this plugin and the two Gruber files here:
Wow, all this time adding/removing and editing fields and I never saw/bothered to look under that link. Huh, pretty cool. Thanks for pointing this out. Do you know if anyone has written a Markdown or Smarty format?
Ok. so i got them installed. Now is there any way to use both Markdown and Smarty at the same time? Being a drop down list you can only choose one format.
So, what do you think is a better solution. A combined “Markypants” or an extension that alters the XHTML formatting to include both?
I’d prefer a plugin myself, as you don’t necessarily want *everything* that’s run through XHTML typography to be handled by these formatting plugins. What if another plugin, extension, or module utilizes the core typography parsing and expects certain input and output? And keep in mind that in either scenario, you can call plugins from within a plugin, so you won’t need to duplicate any code, but merely require that the other plugins are installed. Should either of those plugins change, that will also mean that you won’t have to duplicate those changes in your own solution.
what would be good is an extension that adds markdown to the “Default Text Formatting for This Field” dropdown when adding custom fields.
I always use markdown for large textareas and it’s a little frustrating that you can’t add markdown (or any others) to the list unless you’re editing the field.
I’ve always had to create the custom field with xhtml as the formatting, save it, go back in to edit it, click the link to edit the list, choose markdown, and then remember to click the checkbox at the bottom, and save.
I’ve tried combining the two however when I choose MarkyPants from the formatting drop down and try to publish a link it seems to get converted twice (once by Markdown and once by EE’s internal formatting). Because of that I get links like this:
It seems that MarkyPants is creating the link and then EE is converting the link again inside of the Markdown link. Is there any way to turn off EE’s ability to convert links from within my plugin?
Not sure how to do it from within your plugin, but is it no good doing it in the weblog preferences? “Automatically turn URLs and email addresses into links? yes/no “.
Ok. That seems to work well (turning it off in the Weblog’s individual preferences) so I have for everyone a revised “MarkyPants” plugin. Enjoy! And don’t forget it requires the Markdown and SmartyPants plugins to be installed also.
mark, I’m getting this error after setting a field formatting as markypants. markdown, smartypants, and markypants are installed.
Fatal error: Cannot redeclare identify_modifier_markdown() (previously declared in C:\dev\myproject\myadmin\plugins\pi.markdown.php:241) in C:\dev\myproject\myadmin\plugins\pi.markdown.php on line 252
did you mean that Markdown and SmartyPants should be uninstalled?