Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
8dae0f76
Commit
8dae0f76
authored
Aug 21, 2017
by
Andreas Valder
Browse files
javascript string replace...
parent
a6f18878
Changes
1
Hide whitespace changes
Inline
Side-by-side
static/moderator.js
View file @
8dae0f76
...
...
@@ -63,10 +63,10 @@ var moderator = {
},
editor
:
{
fromhtml
:
function
(
str
)
{
return
str
.
replace
(
'
<br>
'
,
'
\n
'
)
return
str
.
replace
(
/
<br>
/g
,
'
\n
'
)
},
tohtml
:
function
(
str
)
{
return
str
.
replace
(
'
\n
'
,
'
<br>
'
)
return
str
.
replace
(
/
\n
/g
,
'
<br>
'
)
},
init
:
function
()
{
var
editable
=
$
(
'
.moderator_editor
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment