Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Line Break Policy and Add Shift+Enter Functionality #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# egg- Fork Version

Changed line break policy

![](https://badgen.net/badge/CodeX%20Editor/v2.0/blue)

# Warning Tool
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@editorjs/warning",
"version": "1.4.0",
"name": "@egg-/editorjs-warning",
"version": "1.4.1",
"keywords": [
"codex editor",
"warning",
Expand Down
8 changes: 1 addition & 7 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

.cdx-warning::before {
content: '';
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='5' y='5' width='14' height='14' rx='4' stroke='black' stroke-width='2'/%3E%3Cline x1='12' y1='9' x2='12' y2='12' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M12 15.02V15.01' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNC43NSIgeT0iNC43NSIgd2lkdGg9IjE0LjUiIGhlaWdodD0iMT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x-warning::before {
display: none;
}
}

.cdx-warning__message {
min-height: 85px;
}
Expand Down
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class Warning {
* @returns {boolean}
*/
static get enableLineBreaks() {
return true;
return false;
}

/**
Expand Down Expand Up @@ -185,7 +185,9 @@ export default class Warning {
static get sanitize() {
return {
title: {},
message: {},
message: {
br: true,
},
};
}
}