Double last line
Reported by loranger | February 10th, 2010 @ 01:38 AM | in 0.5
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 ?
Comments and changes to this ticket
-
Lim Chee Aun February 10th, 2010 @ 11:52 PM
- 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...
-
loranger February 12th, 2010 @ 12:05 AM
rootElement fixes the issue, thank you.
You should add it in the documentation, it may be helpul.
Thank again
-
Lim Chee Aun February 12th, 2010 @ 12:35 AM
- State changed from open to resolved
- Tag changed from bug paragraphise to bug, paragraphise
No problem. I've added it to the docs.
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A simple web-based WYSIWYG editor, written in Mootools.