Improvements of message displaying (internal styles)

This commit is contained in:
RainLoop Team 2015-05-31 21:40:54 +04:00
parent 0bba7146a6
commit 4457cdbc23
46 changed files with 1967 additions and 359 deletions

View file

@ -196,7 +196,7 @@
{
this.modeToggle(true);
sHtml = sHtml.replace(/<[pP][^>]*><\/[pP]>/g, '');
sHtml = sHtml.replace(/<p[^>]*><\/p>/ig, '');
try {
this.editor.setData(sHtml);

View file

@ -867,13 +867,16 @@
sText = sHtml
.replace(/\u0002([\s\S]*)\u0002/gm, '\u200C$1\u200C')
.replace(/<[pP][^>]*><\/[pP]>/g, '')
.replace(/<p[^>]*><\/p>/gi, '')
.replace(/<pre[^>]*>([\s\S\r\n]*)<\/pre>/gmi, convertPre)
.replace(/[\s]+/gm, ' ')
.replace(/((?:href|data)\s?=\s?)("[^"]+?"|'[^']+?')/gmi, fixAttibuteValue)
.replace(/<br[^>]*>/gmi, '\n')
.replace(/<\/h[\d]>/gi, '\n')
.replace(/<\/p>/gi, '\n\n')
.replace(/<ul[^>]*>/gmi, '\n')
.replace(/<\/ul>/gi, '\n')
.replace(/<li[^>]*>/gmi, ' * ')
.replace(/<\/li>/gi, '\n')
.replace(/<\/td>/gi, '\n')
.replace(/<\/tr>/gi, '\n')