Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// heading shall only contain unmarked text
const heading = nodes.get('heading');
heading.content = 'text*';
heading.marks = '';
heading.group = 'baseonly';
nodes = nodes.update('heading', heading);
orderedList.group = 'container';
orderedList.content = 'list_item+';
nodes = nodes.update('ordered_list', orderedList);
bulletList.group = 'container';
bulletList.content = 'list_item+';
nodes = nodes.update('bullet_list', bulletList);
listItem.content = '(paragraph | protected_block | substitution_block)+ (ordered_list | bullet_list)?';
nodes = nodes.update('list_item', listItem);
nodes = nodes.append(tableNodes({
tableGroup: 'container',
cellContent: '(paragraph | protected_block | substitution_block)+',
cellAttributes: {
align: {
default: '',
setDOMAttr(val, attr) {
if (!val) {
// eslint-disable-next-line no-param-reassign
attr.class = null;
return;
}
// eslint-disable-next-line no-param-reassign
attr.class = `${val}align`;