I'm using markitup (markitup.jaysalvat.com) to create a customized editor for users who have no experience with html. I've just included the tags h1
, bold
and hyperlink
.
Now I've a problem with the line break. I've changed the following setting in file set.js:
onTabEnter: {keepDefault:false, replaceWith:'<br />\n'},
to
onEnter: {keepDefault:false, replaceWith:'<br/>\n'},
Of course it works. Now there's a <br/>
-Tag for each klick on Enter/Return. But:
People write there texts and stories offline in editors like MS Word, Libre Office or simple RTF-Editors. If they want to transfer the saved texts from the offline Editors (using "copy&paste") to markitup the line breaks are lost.
Is there a solution for automatic detect line breaks \r
or \n
?
I think there's a difference between Linux and Windows. If it's important: The Webserver is running Linux.
EDIT: Now i've seen that the line breaks become auto detected when using the BB-Code-Parser of markitup. But I need it with the HTML-Parser.