add table commands, add tableRole to the schema, add buttons to the example

This commit is contained in:
Hans Pagel
2021-01-21 00:16:45 +01:00
parent cfe0898fdd
commit fde2b1572d
7 changed files with 163 additions and 11 deletions

View File

@@ -68,6 +68,11 @@ export interface NodeConfig<Options = any, Commands = {}> extends Overwrite<Exte
*/
isolating?: NodeSpec['isolating'] | ((this: { options: Options }) => NodeSpec['isolating']),
/**
* Table Role
*/
tableRole?: NodeSpec['tableRole'] | ((this: { options: Options }) => NodeSpec['tableRole']),
/**
* Parse HTML
*/

View File

@@ -36,6 +36,7 @@ export default function getSchema(extensions: Extensions): Schema {
code: callOrReturn(extension.config.code, context),
defining: callOrReturn(extension.config.defining, context),
isolating: callOrReturn(extension.config.isolating, context),
tableRole: callOrReturn(extension.config.tableRole, context),
attrs: Object.fromEntries(extensionAttributes.map(extensionAttribute => {
return [extensionAttribute.name, { default: extensionAttribute?.attribute?.default }]
})),