• Resolved wuh

    (@wuh)


    Hi all, just a quick question. I’ve enabled the tiny_mce editor in my plugin, but it does not work quite as it should. If I compare the output of my plugin to the output of any WordPress posts and pages, I can see that posts/pages by default wrap text within <p> tags. My plugin’s output does not do this. In fact, if I want line breaks at all the only way I can do it is to use nl2br(). Paragraph tags are also placed around any text I justify, but not the remaining unformatted blocks of text.

    Since I can see from looking at my post/page database tables that the paragraph tags are not present, they are obviously being added at run-time – my question is, which function / filter hook is responsible for formatting output like this?

    Any ideas would be much appreciated – I hope my question is clear.

    Huw

Viewing 1 replies (of 1 total)
  • Thread Starter wuh

    (@wuh)

    For some reason, no matter how long I’ve been searching, I always find the answer moments after posting…

    The function is wpautop()

    Hope it helps someone!

Viewing 1 replies (of 1 total)
  • The topic ‘Formatting output correctly’ is closed to new replies.