feat: New Scenarios page (#11975)
This commit is contained in:
@@ -319,6 +319,12 @@ const createNode = (editorView, nodeType, content) => {
|
||||
return state.schema.text(`{{${content}}}`);
|
||||
case 'emoji':
|
||||
return state.schema.text(content);
|
||||
case 'tool': {
|
||||
return state.schema.nodes.tools.create({
|
||||
id: content.id,
|
||||
name: content.title,
|
||||
});
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -355,6 +361,11 @@ const nodeCreators = {
|
||||
from,
|
||||
to,
|
||||
}),
|
||||
tool: (editorView, content, from, to) => ({
|
||||
node: createNode(editorView, 'tool', content),
|
||||
from,
|
||||
to,
|
||||
}),
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user