feat: adding editorjs
This commit is contained in:
@@ -1625,20 +1625,6 @@ li {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[contenteditable="true"] {
|
|
||||||
outline: none;
|
|
||||||
background-color: var(--bg-light-gray);
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
border: 1px solid var(--gray-300);
|
|
||||||
padding: 0.5rem 0.75rem;
|
|
||||||
color: var(--gray-900);
|
|
||||||
}
|
|
||||||
|
|
||||||
[contenteditable="true"]:empty:before {
|
|
||||||
content: attr(data-placeholder);
|
|
||||||
color: var(--gray-600);
|
|
||||||
}
|
|
||||||
|
|
||||||
.course-image-attachment {
|
.course-image-attachment {
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
background-color: var(--bg-light-gray);
|
background-color: var(--bg-light-gray);
|
||||||
@@ -1675,10 +1661,6 @@ li {
|
|||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.course-card-pills[contenteditable="true"] {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preview {
|
.preview {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import EditorJS from "@editorjs/editorjs";
|
import EditorJS from "@editorjs/editorjs";
|
||||||
|
import Header from "@editorjs/header";
|
||||||
|
import List from "@editorjs/list";
|
||||||
|
|
||||||
const editor = new EditorJS("body");
|
create_editor_for_short_description = () => {
|
||||||
|
let editor = new EditorJS({
|
||||||
console.log(editor);
|
holder: "course-description",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="">
|
||||||
<input type="text" class="field-input">
|
<div type="text" class="field-input"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -61,6 +61,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<img>
|
<img>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="course-title">
|
||||||
|
<div class="field-label">
|
||||||
|
{{ _("Course Description") }}
|
||||||
|
</div>
|
||||||
|
<div class="field-description">
|
||||||
|
{{ _("Add a detailed description") }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input id="course-description" class="field-input">
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -21,6 +21,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@4tw/cypress-drag-drop": "^2",
|
"@4tw/cypress-drag-drop": "^2",
|
||||||
"@cypress/code-coverage": "^3",
|
"@cypress/code-coverage": "^3",
|
||||||
|
"@editorjs/header": "^2.7.0",
|
||||||
|
"@editorjs/list": "^1.8.0",
|
||||||
"@testing-library/cypress": "^8",
|
"@testing-library/cypress": "^8",
|
||||||
"@testing-library/dom": "8.17.1",
|
"@testing-library/dom": "8.17.1",
|
||||||
"cypress-real-events": "^1.7.6"
|
"cypress-real-events": "^1.7.6"
|
||||||
|
|||||||
Reference in New Issue
Block a user