The Movable Type Knowledge Base

Turning off Convert Breaks Temporarily in an Entry

Question

I need to insert some Javascript (or code samples, or a blockquote) in an entry, but the Convert Breaks Formatting option is causing a problem. I don't want to turn off the Formatting option entirely for the entry; is there a way to avoid the Convert Breaks Formatting from being applied to certain parts of the Entry Body?

Answer

Movable Type temporarily turns off Convert Breaks Formatting when it encounters certains tags in the Entry Body:

  • h1, h2, h3, h4, h5, h6
  • table
  • ol, dl, ul
  • menu
  • dir
  • p
  • pre
  • center
  • form, fieldset, select
  • blockquote
  • address
  • div
  • hr

So, try using a tag like <center> or <div> before and after your script code:

<center><script language="JavaScript">
(script code here)
</script></center>

Note that Convert Breaks Formatting will switch back on if a full blank line is encountered, even if it's before the closing "protected" tag, so make sure your script does not contain any empty lines.

When using this method to avoid automatic Convert Breaks Formatting, you'll need to insert your own <p> and <br /> tags within the protected area if desired.

Submit Feedback on This Article

Your comments on how we can improve this article are appreciated; but please do not use the feedback form to submit support requests or questions. We will not respond to or publish such queries submitted through this form. If you have a technical question or problem, visit Movable Type Support.

Yahoo! Small Business web hosting services

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.