MCPcopy Index your code
hub / github.com/resend/react-email / hasContainerNode

Function hasContainerNode

packages/editor/src/extensions/container.tsx:9–17  ·  view source on GitHub ↗
(doc: PmNode)

Source from the content-addressed store, hash-verified

7import { inlineCssToJs } from '../utils/styles';
8
9function hasContainerNode(doc: PmNode): boolean {
10 let found = false;
11 doc.forEach((node) => {
12 if (node.type.name === 'container') {
13 found = true;
14 }
15 });
16 return found;
17}
18
19function wrapInContainer(state: EditorState) {
20 const { doc } = state;

Callers 2

addProseMirrorPluginsFunction · 0.85
appendTransactionFunction · 0.85

Calls 1

forEachMethod · 0.80

Tested by

no test coverage detected