Text HTML editor - using <div> and <br> instead of <p>?

Last post 02-05-2010, 2:32 PM by roger. 2 replies.
Sort Posts: Previous Next
  • Text HTML editor - using <div> and <br> instead of <p>?

     02-04-2010, 6:28 PM

    When using the text editor on a screen in Udutu, the HTML editor appears to be inconsistent in how it treats new paragraphs.

    I have instances of pages using <p> only, <div>s only, and <div>s and <br>s. 

    On the screens where I already have <p>, hitting carriage return in the editor creates new <p>s. If the screen already has <div> it continues to use <div> and/or <br>.

    I would've expected just <p>s.

    Funnily enough, when I'm writing this post, the HTML editor in the forums is using <p> paragraphs. 

    Is there something I am doing wrong? I am copying-and-pasting the content into the Udutu text editor from a source document. But if I add text by hand, it also appears to avoid using <p>.

    I ask because I would like to style the paragraphs to create padding-bottom and padding-top to add space between paragraphs in the textContent. If the formatting is inconsistent, the changes vary in how the screen appears.

    Filed under: , ,
  • 1507 in reply to 1506

    Re: Text HTML editor - using <div> and <br> instead of <p>?

     02-04-2010, 9:49 PM

    Well, I've managed to find my own answer!

    The behaviour I noticed for the myUdutu editor is set by the third-party editor Udutu uses - Telerik's RadEditor. For whatever reason, it only uses <p> tags if you create a <p> tag to start with - then it keeps using <p>'s. Also, the behaviour possibly changes depending on the browser being used.

    So if you switch to HTML editing mode BEFORE adding any text, add <p>text</p>, you can then go back to Rich Text editing mode, replace 'text' with your content, and whenever you press 'enter' the editor will include <p></p> tags. 

    Funnily enough, the Forums use the MCE editor, and this is why the behaviour is different (and in my opinion correct).

    I was hoping the Library could import batch text files and I'd try getting them in this way, but that doesn't appear to work. I guess I'll just prepare my text with <p>, and paste them into Udutu's editor in the HTML mode.

    If anyone has other suggestions, I'd still appreciate hearing them.

    Thanks, Richard. 

  • 1509 in reply to 1507

    Re: Text HTML editor - using <div> and <br> instead of <p>?

     02-05-2010, 2:32 PM

    Thanks Richard,

    We hadn't noticed that in more than 27,000 courses created so far. We'll investigate why that behavior occurs, and appreciate your workaround. If more people are interested in a batch import for text we could add that feature. We had even contemplated dropping text as a re-usable object in the library, because it is so infrequently used relative to the space it takes.

    Most people copy and paste, then use the all purpose stripper (brush icon to the right of the paragraph style box).

View as RSS news feed in XML

how to build effective online courses and simulations

learn how our tool myudutu works

log-in to free version of myudutu now

Powered by Community Server, by Telligent Systems