nl2p
Posted: Thu Mar 19, 2009 9:10 pm
Nl2p is made as replacement for nl2br, preserving the possibility to distinct between small paragraphs/breaks and real paragraphs. One newline after a textblock will insert <p class="break"> at it's beginning, which inserts no whiteline after the block. If there are more newlines it inserts <p class="whiteline">. Used in combination with a css like: it simulates the abilitys of a real editor without using (ugly) br-tags.
You can use textile and have almost the same effect, besides that textile uses br-tags for one newline. But opposing to textile nl2p totally ignores HTML-blockelements, so it's possible to construct a table in HTML without the need to deactivate the markup-plugin. Blockquotes are an exception, newlines in them will get converted. Nl2p makes sure that no blockelements are within <p>-tags, isolating them.
One issue: It won't work well in combination with markdown or textile. But for basic markup-functionality one can use s9ymarkup, or liquid (working title), which basically provides the necessary things: italic (*), bold (**) and links ().
Eine deutsche Erklärung gibt es [url=http://www.onli-blogging.de/index.php?/archives/629-nl2p-fuer-Serendipity.html]hier (die dort verlinkte ist Version allerdings veraltet).
Code: Select all
p.whiteline {
margin-bottom: 1em;
}
p.break {
margin-bottom: 0em;
}You can use textile and have almost the same effect, besides that textile uses br-tags for one newline. But opposing to textile nl2p totally ignores HTML-blockelements, so it's possible to construct a table in HTML without the need to deactivate the markup-plugin. Blockquotes are an exception, newlines in them will get converted. Nl2p makes sure that no blockelements are within <p>-tags, isolating them.
One issue: It won't work well in combination with markdown or textile. But for basic markup-functionality one can use s9ymarkup, or liquid (working title), which basically provides the necessary things: italic (*), bold (**) and links ().
Eine deutsche Erklärung gibt es [url=http://www.onli-blogging.de/index.php?/archives/629-nl2p-fuer-Serendipity.html]hier (die dort verlinkte ist Version allerdings veraltet).