Commit 8dae0f76 authored by Andreas Valder's avatar Andreas Valder
Browse files

javascript string replace...

parent a6f18878
...@@ -63,10 +63,10 @@ var moderator = { ...@@ -63,10 +63,10 @@ var moderator = {
}, },
editor: { editor: {
fromhtml: function (str) { fromhtml: function (str) {
return str.replace('<br>', '\n') return str.replace(/<br>/g, '\n')
}, },
tohtml: function (str) { tohtml: function (str) {
return str.replace('\n', '<br>') return str.replace(/\n/g, '<br>')
}, },
init: function() { init: function() {
var editable = $('.moderator_editor'); var editable = $('.moderator_editor');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment