Merge pull request #205 from codex-team/hotfix

Check input when wrapping plain text with paragraphs
This commit is contained in:
George Berezhnoy 2017-10-12 20:07:57 +03:00 committed by GitHub
commit b9776c9c97
6 changed files with 5029 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -720,6 +720,8 @@ module.exports = (function (content) {
*/
var wrapPlainTextWithParagraphs = function (plainText) {
if (!plainText) return '';
return '<p>' + plainText.split('\n\n').join('</p><p>') + '</p>';
};

View file

@ -174,6 +174,9 @@ module.exports = (function (notifications) {
};
/**
* Show notification block
*/
function send() {
editor.nodes.notifications.appendChild(notification);
@ -191,6 +194,9 @@ module.exports = (function (notifications) {
};
/**
* Remove notification block
*/
function close() {
notification.remove();

5018
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "codex.editor",
"version": "1.7.7",
"version": "1.7.8",
"description": "Codex Editor. Native JS, based on API and Open Source",
"main": "index.js",
"scripts": {