mirror of
https://github.com/docmost/docmost.git
synced 2026-08-31 02:46:27 +08:00
fix placeholder check
This commit is contained in:
@@ -194,8 +194,9 @@ export const mainExtensions = [
|
|||||||
return i18n.t("Toggle title");
|
return i18n.t("Toggle title");
|
||||||
}
|
}
|
||||||
if (node.type.name === "paragraph") {
|
if (node.type.name === "paragraph") {
|
||||||
const $pos = editor.state.doc.resolve(pos);
|
const doc = editor.state.doc;
|
||||||
const parentName = $pos.parent.type.name;
|
if (pos >= 0 && pos <= doc.content.size) {
|
||||||
|
const parentName = doc.resolve(pos).parent.type.name;
|
||||||
if (
|
if (
|
||||||
parentName === "column" ||
|
parentName === "column" ||
|
||||||
parentName === "tableCell" ||
|
parentName === "tableCell" ||
|
||||||
@@ -205,6 +206,7 @@ export const mainExtensions = [
|
|||||||
) {
|
) {
|
||||||
return i18n.t("Write...");
|
return i18n.t("Write...");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return i18n.t('Write anything. Enter "/" for commands');
|
return i18n.t('Write anything. Enter "/" for commands');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user