Feature Request: Custom Text Formatting Options
-
Objective:
I need a flexible solution that lets me choose how text is formatted for three different areas: (comment_text
), post content (the_content
), and excerpt text (the_excerpt
). For each area, I want to be able to select one of the following formatting options:- Auto:
- What it does: Uses WordPress’s default formatting.
- Behavior: Leaves everything as-is, which means the default
wpautop
filter is active (automatically wrapping paragraphs in<p>
tags).
- nl2br:
- What it does: Removes the automatic
<p>
tag wrapping and converts newline characters into<br>
tags. - Behavior:
- First, the
wpautop
filter is removed to prevent WordPress from automatically adding<p>
tags. - Then, the
nl2br
filter is applied to convert newline characters (\n
) into<br>
tags. This is useful when I want to maintain line breaks exactly as I type them without extra paragraph tags.
- First, the
- What it does: Removes the automatic
- None:
- What it does: Removes any automatic formatting.
- Behavior: Only the
wpautop
filter is removed, with no additional formatting applied. This means the output will display exactly as entered without WordPress adding any extra HTML tags.
- Auto:
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.