Skip to content

Commit

Permalink
add warning
Browse files Browse the repository at this point in the history
  • Loading branch information
felixroos committed Dec 30, 2024
1 parent 8e1db86 commit 5f6a8ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ const flokBasicSetup = (doc) => {

const createEditor = (doc) => {
console.log("createEditor", doc);
if (!["slot1", "slot2"].includes(doc.id)) {
console.warn(
`ignoring doc with id "${doc.id}". only slot1 and slot2 is allowed rn..`
);
return;
}
const state = EditorState.create({
doc: doc.content,
extensions: [
Expand Down

0 comments on commit 5f6a8ed

Please sign in to comment.