mirror of
https://github.com/codex-team/editor.js
synced 2024-05-28 03:23:27 +02:00
Merge pull request #205 from codex-team/hotfix
Check input when wrapping plain text with paragraphs
This commit is contained in:
commit
b9776c9c97
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -720,6 +720,8 @@ module.exports = (function (content) {
|
||||||
*/
|
*/
|
||||||
var wrapPlainTextWithParagraphs = function (plainText) {
|
var wrapPlainTextWithParagraphs = function (plainText) {
|
||||||
|
|
||||||
|
if (!plainText) return '';
|
||||||
|
|
||||||
return '<p>' + plainText.split('\n\n').join('</p><p>') + '</p>';
|
return '<p>' + plainText.split('\n\n').join('</p><p>') + '</p>';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -174,6 +174,9 @@ module.exports = (function (notifications) {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show notification block
|
||||||
|
*/
|
||||||
function send() {
|
function send() {
|
||||||
|
|
||||||
editor.nodes.notifications.appendChild(notification);
|
editor.nodes.notifications.appendChild(notification);
|
||||||
|
@ -191,6 +194,9 @@ module.exports = (function (notifications) {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove notification block
|
||||||
|
*/
|
||||||
function close() {
|
function close() {
|
||||||
|
|
||||||
notification.remove();
|
notification.remove();
|
||||||
|
|
5018
package-lock.json
generated
Normal file
5018
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "codex.editor",
|
"name": "codex.editor",
|
||||||
"version": "1.7.7",
|
"version": "1.7.8",
|
||||||
"description": "Codex Editor. Native JS, based on API and Open Source",
|
"description": "Codex Editor. Native JS, based on API and Open Source",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in a new issue