Skip to content

Commit

Permalink
Don't use default styling but offload it to classes
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelderuiter committed Oct 11, 2023
1 parent 79290a5 commit cacab71
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "editorjs-layout",
"version": "1.2.5",
"version": "1.2.6",
"description": "Layout block tool for Editor.js. ",
"keywords": [
"codex editor",
Expand All @@ -9,10 +9,13 @@
"layout",
"tool"
],
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"bugs": {
"url": "https://github.com/hata6502/editorjs-layout/issues"
"url": "https://github.com/manuelderuiter/editorjs-layout/issues"
},
"repository": "https://github.com/hata6502/editorjs-layout",
"repository": "https://github.com/manuelderuiter/editorjs-layout.git",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/hata6502"
Expand Down
10 changes: 3 additions & 7 deletions src/itemContent/createDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ const createDialog = ({
onClose?: (event: { editorJSData: OutputData }) => void;
}) => {
const dialog = document.createElement("dialog");
dialog.classList.add('editorjs-layout-container');

dialog.style.maxWidth = "960px";
// Make be not able to click inner
dialog.style.padding = "0";
dialog.style.width = "calc(100% - 64px)";

const editorJSHolder = document.createElement("div");
const editorJSHolderID = uuidv4();

const editorJSHolder = document.createElement("div");
editorJSHolder.id = editorJSHolderID;
editorJSHolder.classList.add('editorjs-holder');

dialog.append(editorJSHolder);

Expand Down
2 changes: 1 addition & 1 deletion src/itemContent/itemContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const renderItemContent = ({
}: RenderItemContentProps) => {
const editorJSHolderID = uuidv4();
const wrapper = document.createElement("div");

wrapper.classList.add('editorjs-item-container');
wrapper.id = editorJSHolderID;

if (readOnly) {
Expand Down

0 comments on commit cacab71

Please sign in to comment.