Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-06-04 20:13:03

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Markdown as an option for 4.5? Make it pluggable perhaps!

As much as I love Textile (it is, afterall, what introduced me to the world outside of \LaTeX text markup) I would love the option to chose something other than textile as my text processing engine. Namely MultiMarkdown. It works in so many applications now and it gets more and more confusing to switch between Textile an Markdown.

What about adding a simple functionality to extend the drop down list in the Admin menu that allows me to select Textile or line breaks to be extensible by a plugin or directly shipping Markdown with Textpattern? I would even volunteer to write the Plugin to do so, if only someone could tell me whether it is possible at all or not :-)


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#2 2012-06-05 07:22:07

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Markdown as an option for 4.5? Make it pluggable perhaps!

As this idea keeps popping up I’ve filed an issue to keep it in sight.

I’d rather not bundle any additional text filters with the core but rather provide a versatile interface for text filter plugins and, if energy permits, a user interface to allow publishers to define filter chains.

Offline

#3 2012-06-05 08:07:15

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Markdown as an option for 4.5? Make it pluggable perhaps!

I personally don’t see need for a user interface or chaining options. If and when the filters are implemented by a plugin load order can be used, and things as purifying (or any other post-processing) could be done by a persistent hook, ran no matter what processing option is selected by the end user.

As the whole deal goes, as bare minimum probably needs:

  • some changes to how the article markup option is stored. Instead of the integer use_textile, some unique identifier is probably needed. A column that stores a prefixed unique identifier assigned for a text filtering stack/callback.
  • registering method that adds an extra markup options to the Write pane, and registers to a callback event on the current Textiling location. One that passes content by reference.

Persistent processing/filtering could hook to the callback event directly without adding options to the markup option, while registered markup processors appear in it.

In my opinion that should be enough to allow plugins to change the processing method from Textile to something else, or add additional sets. Adding some sort of interface is in my opinion way too much bloat.

Offline

#4 2012-06-06 07:37:43

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Markdown as an option for 4.5? Make it pluggable perhaps!

+1 for Markdown as a syntax option.

If an option to use Markdown is added, Txp will gain a certain sum of new users. Very happy to see this in discussion as a real potential. Exciting.

Offline

#5 2012-06-06 09:53:30

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,058
Website GitHub Mastodon Twitter

Re: Markdown as an option for 4.5? Make it pluggable perhaps!

If other text processing engines are to be thought of, I think that a generic approach should be favorable so as to allow almost any kind of engine to be used. Having said this, I have no idea about how difficult (or possible), this would be.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#6 2012-06-06 10:07:28

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Markdown as an option for 4.5? Make it pluggable perhaps!

IIRC, Markdown already comes with a textile compatibility method. You’d need to check with the MD documentation for exactly how to do this, but I think it is as simple as renaming the MD file and replacing the textile file with it.


Steve

Offline

#7 2012-07-02 14:48:48

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: Markdown as an option for 4.5? Make it pluggable perhaps!

I saw this issue is marked as “accepted” on googlecode. Does that mean it will be in 4.5 or do we have to wait for a 4.5+ release?


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#8 2012-07-02 14:59:21

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,402
Website GitHub

Re: Markdown as an option for 4.5? Make it pluggable perhaps!

stephan wrote:

I saw this issue is marked as “accepted” on googlecode. Does that mean it will be in 4.5 or do we have to wait for a 4.5+ release?

It’s accepted insofar as it’ll appear in core at some point. But 4.5 is now in feature lockdown, bug hunt and issue squash mode, so it won’t be this time round.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#9 2012-07-02 15:21:41

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: Markdown as an option for 4.5? Make it pluggable perhaps!

OK, great. That is what I thought – thanks!


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#10 2012-07-30 12:03:33

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Markdown as an option for 4.5? Make it pluggable perhaps!

As far as I can remember, past discussion have always revolved around alternate markup filters for the “Write” tab.

Has anyone ever encountered a real user’s requirement to switch away from Textile for the public side, i.e. comment formatting?

Offline

#11 2012-07-30 12:27:17

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,135
Website

Re: Markdown as an option for 4.5? Make it pluggable perhaps!

wet wrote:

Has anyone ever encountered a real user’s requirement to switch away from Textile for the public side, i.e. comment formatting?

A friend commented recently to me that he regularly sees markdown formatting left by visitors on his TXP powered site. He suspects people aren’t paying attention… But I don’t think that makes a use case. Another TXP site where I can peak behind the curtain sometimes has bbcode markup in comments.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#12 2012-09-13 11:44:13

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Markdown as an option for 4.5? Make it pluggable perhaps!

Installable textfilters have landed in r4115.

A sample Markdown plugin is available at my Github repo: wet_textfilter_markdown. Once installed, the write panel looks like this:

Offline

Board footer

Powered by FluxBB