Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Double last line

#17

I use the very last version of mooeditable which seems to work well except this very annoying bug I have :
The last sentence I write is always repeated twice if I write more than one line.

Let me show you the code I use :

window.addEvent('domready', function(){

var myMooEditable = new MooEditable('myEditor', {
    handleSubmit: true,
    paragraphise: false,
    actions: 'bold italic underline strikethrough | insertunorderedlist | undo redo | createlink unlink | toggleview'
});

$('myForm').addEvent('submit', function(evt){
    console.log( myMooEditable.getContent() );
    console.log( $('myEditor').get('value') );
    evt.stop();
    doStuffsThenSubmit();
});



});

If I fill the editor with the sentence
Hello world

My console will output
Hello world

<p>Hello world</p>

But if I fill it with
Hello World

How are you ?

My console output
Hello world<br />How are you ?

<p>Hello world<br>How are you ?</p>How are you ?

I'm a little bit disapoited. Did I miss something ? I can't believe I'm the only guy who found this bug, have I done something wrong in my mooeditable instanciation ?

Reported by loranger · February 10th, 2010 @ 01:38 AM

State: resolved
Milestone: 0.5
Assigned to: Lim Chee Aun Lim Chee Aun

Activity

  1. Lim Chee Aun
    Lim Chee Aun
    • State changed from new to open
    • Tag set to bug paragraphise

    You need to set 'rootElement' option to false. And I've commited a bug fix which removes multiple BRs http://github.com/cheeaun/mooeditable/commit/ad115c91b74d60dcf0fa83...

    February 10th, 2010 @ 11:52 PM

  2. loranger
    loranger

    rootElement fixes the issue, thank you.

    You should add it in the documentation, it may be helpul.

    Thank again

    February 12th, 2010 @ 12:05 AM

  3. Lim Chee Aun
    Lim Chee Aun
    • State changed from open to resolved
    • Tag changed from bug paragraphise to bug, paragraphise

    No problem. I've added it to the docs.

    February 12th, 2010 @ 12:35 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.