To P or not to P: that is the question

  • Updated

To P or not to P: that is the question

At the heart of the matter is the unknown purpose of the content as it is being written. Is it meant to be a single line of formatted text to be inserted in some other paragraph? Or, is it meant to be a paragraph on its own?

To

, or not to

: that is the question:
Whether 'tis meant in the mind of author
The paragraph of outright prose,
Or a single line of rich text,
And by opposing either of them? To cry: lose sleep;
No more; and by this piece to say we end
The heart-ache and the thwarted satisfaction
That choice is heir to, 'tis a consummation
Devoutly to be wish'd.

(apologies to W.S. and his admirers)

At the heart of the matter is the unknown purpose of the content as it is being written. Is it meant to be a single line of formatted text to be inserted in some other paragraph? Or, is it meant to be a paragraph on its own? When there are multiple paragraphs, the answer is obvious. But not so otherwise.

Defects have been recorded on both sides of the issue. Some stating that the editor is removing their P tags and other that it is wrapping their text in P tags. Both are real hurdles. For some, the desired P tags are needed to block off the text from the rest of the flow. For the unwanted P tags, the tags prevent the text from continuing on the same line when displayed in the template on the web page.

Given that it is easier to add blocking tags (e.g., DIV) than to figure out what to remove, the decision was made to omit P tags when the content is a single paragraph UNLESS the P tag was explicitly added.

In previous versions, IE would not implicitly contain P tags, but Firefox would. An author using IE and typing a single line would save without P tags.

"I was bold in the pursuit of knowledge" ~ Thomas Jefferson

That same author using Firefox and typing the same single line would save with P tags.

"I was bold in the pursuit of knowledge" ~ Thomas Jefferson

We have since made all browsers (including Google Chrome) consistent.

At question is whether, conceptually, the author is typing content with only IN-LINE MARKUP (e.g., bold, italic, hyperlinks, images, etc.) or BLOCK-LEVEL MARKUP (paragraphs, tables, lists, etc.). Perhaps in the future we will have the ability to specify the intent.

What to do?

If you need to ensure content is blocking, wrap it in DIV tags. The DIV tags may wrap the ContentBlock server control in your aspx template or in the XSLT for rich area fields in a Smart Form. It's not a perfect solution because DIV tags are not P tags, but it is workable.

This can also be fixed by Checking the "keep single blocking tags" check box in the text field box on the smart form config.