Auto <p></p>


By default, Qwwwik automatically formats lines of text as HTML paragraphs. It does this by using an 'Open Source' PHP function adapted from WordPress wpautop() (no point re-inventing the wheel). The function is quite complex because it must prevent the HTML paragraph tags <p></p> wrongly applying themselves to other tags, with unwanted side-effects. Qwwwik in fact uses other functions to prevent some of those side effects but that's another story. wpautop() generally works well enough to be used by default.

Not everybody who uses WordPress likes wpautop(). After all, it simply offers a way not to have to write the paragraphs tags whenever a paragraph of text is required. Why add extra workload to PHP? Why not add the <p></p> tags manually when writing a page, dispense with wpautop(), and make things a bit faster?

From Qwwwik version 1.8 (18th June 24 onwards) 'admin/setup' provides an option to disable wpautop() if you prefer not to use it. But be careful. If you have already created web pages and you turn wpautop() off, there will be no HTML paragraphs as such except (i) those you may have already written the tags for and (ii) parts of a page where Qwwwik adds them as standard.

This is what normal text looks like with no <p></p> tags anywhere:


Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

You don't want that! You would then have to go back to every page and add the tags manually. So if you really want to disable Auto <p></p> YES/NO (as a proportion of WordPress users do) <p>add the tags manually first</p>. You can then write pure HTML and nothing will be 'tampered with'. As for me, I do not disable it.

Note: if you disabled Auto <p></p> and wrote all the paragraph tags, you can still enable it again for subsequent pages. It does not add the tags where they already exist.

See information

Page last modified: 14 July, 2024
Search | Legal | Qwwwik

Info