Can someone explain the differences in formating and results with:
# Markdown
# Textile 1
# Textile2
# autop
# nl2br
# SmartPants
# texturize
What does each do? How are they different?
Can someone explain the differences in formating and results with:
# Markdown
# Textile 1
# Textile2
# autop
# nl2br
# SmartPants
# texturize
What does each do? How are they different?
Read the Markdown and Textile documentations. The only difference is in they way they mark the text to generate the HTML. Personally, I like Textile because it can do acronyms and abbreviations while Markdown can't. You also have to type less brackets with Textile.
autop and nl2br are internal WordPress functions (I believe?) that convert double line breaks to <p> and single line breaks to <br /> tags.
SmartyPants and texturize convert special characters such as the amperstand (&), em-dash (—), etc. into their HTML entity forms and also change straight quotes (" and ') into curly quotes (“” and ‘’).
I'm trying to figure out the plugin Text Control and while it is obviously powerful, there isn't information on what the different choices actually mean. Very frustrating.
Oh, I get it - nl2br - New Line to Break ()....duh! Thanks for helping me clear this up!
I'm just desperately trying to stop WP from entering paragraphs and line breaks in the middle of my post content which includes HTML references.
I don't know if anyone is actively using Text Control, but I'm trying to find out if it works upon saving the post and/or upon post generation. In other words, when a post is saved to the database, is that the end of it and do I need to edit it and clean out the line breaks and paragraphs where I don't want them and then apply Text Control, or does it automatically fix whatever is screwed up in the database?
I think that all of these are applied using a filter on the text that is grabbed from the database. I think that the text stored in the database is just the text that you entered into your entry field. I'm pretty sure that this is how it works because when I view my feeds, I can see my Textile markup in the content excerpts.
So applies when generated not when submitted. Interesting. You would think it would be stored "right" and not generated, slowing the display times.
Thanks!
remove_filter('the_content', 'wpautop') will keep WP from adding <p> elements to your content field. You can put that in the post loop before you display your content. I assume 'nl2br' works the same.
The reason filters are applied each time the post is called, instead of storing the converted text in the database, is for flexibility. For instance you could change wpautop to add <p class="blah"> and then all posts will immediately reflect the change. If you saved the <p> into the database you'd have to write a function to either remove them from old posts or convert the old posts to the new class. That's difficult because how could the function know whether it's a <p> that you entered or that wpautop entered? But you're right, it does take extra processing to do each time so there's definitely a trade off.
May be I am missing something here. Doesn't using a WYSIWYG eliminates the need for any of these plugins?
I started using one recently and it is such a pleasure to post with it. I will just make sure none of the *default text manipulation plugins* lays a hand on my post at any point at any point.
I prefer Markdown, because it's simple and concerns itself with writing content -- it is not a psuedo-markup language like Textile (and others). The only thing I wish it supported was definition lists. Acronyms etc should really be part of another preprocessor IMHO.
The other great thing about it is there is a reverse processor for it to change xhtml to markdown http://www.aaronsw.com/2002/html2text/
Okay, for the sake of everyone reading here, can someone quickly outline the specifics of what Markdown, Textile 1 or 2, etc., really do to change the text. And I think we need some kind of article in the Codex that explains the differences since going from site to site to figure it out has me really confused.
So how about some specifics to help us all learn what the difference is between these, and why you would choose one over the other.
I've had such nightmare problems with WordPress rewriting my HTML by adding stuff and when I'd look to see in the post where and what was making things bonkers, there would be nothing there. Yet, when I would view the source code, all kinds of crud is in there that I didn't put nor want. Took me days to figure out that it "wasn't me". I love how WP second guesses us, but some of us want to control some of that second guessing.
Teach us all what the differences are. Thanks!
Your best bet is to read the docs provided above. Textile 2 is an improved version of textile 1 (which I believe it says anyway). Each form does have it's own docmentation and summary of what they do. Textile even has a demo site that allows you try things out to see how they work.
I;m not sure if there is a demoand for a further documentation for third party tools that already provided existing documentation. Wouldn't it be just repeating the same thing?
Part of the purpose of this forum is to provide educational information, like historical info so that people searching through the forum can find helpful information that will encourage further exploration and learning.
"Go see the documentation" when there are five or more choices isn't very helpful when it comes to allocating your time on something that might help or waste your time. I'm not asking for a disertation by anyone. Just if you have been working with any of these, how about a sentence or two describing the differences so people can target their energy towards what will help them.
Don't forget that you were encouraged to learn more by asking the "dumb" questions in the beginning. I'm hoping to help those who are clueless about all of this get a little handle on something I, personally, find confusing, too.
I was thinking the same thing, I just don't think it's codex material seeing as they are third party plugins and the codex is essentially for WP. If demand for a third party plugin is documented in the codex it's simple repetition, and there would be requests for explanations of all third party plugins.
As I said, though, the documentation for all plugins is pretty clear providing surmised versions of the full doc to explain what the functions are etc. It's down to personal preference and what you want from these tools and then picking one that matches your needs. I don't think the question is dumb at all, it's a perfectly valid question, but there are resources that exist that do explain the function. Peopel coudl ask for a write up of the difference between Wp-Hascash, SPam Karma, Spaminator and so on - but each already has it's own documentation both with the plugin and author sites. Why rewrite the book?
Though I'm sure someone will oblige with writing up something.
Previous post about Smarty pants:
http://wordpress.org/support/topic.php?id=5479
http://www.michelf.com/projects/php-markdown/
http://textpattern.com/help/?item=intro (Textile)
http://codex.wordpress.org/User:Here/Texturize#What_is_Texturize.3F
http://photomatt.net/tools/texturize
http://wordpress.org/development/2003/05/ (read the the bit where it says highly intelligent line breaks)
http://wordpress.org/support/topic.php?id=20000#post-113967 (what autop pretty much does)
This topic has been closed to new replies.