Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (typeof name === 'string') {
// register(Blot | Attributor, overwrite)
this.register('formats/' + name, path, target);
} else {
Object.keys(path).forEach((key) => {
this.register(key, path[key], target);
});
}
} else {
if (this.imports[path] != null && !overwrite) {
debug.warn(`Overwriting ${path} with`, target);
}
this.imports[path] = target;
if ((path.startsWith('blots/') || path.startsWith('formats/')) &&
target.blotName !== 'abstract') {
Parchment.register(target);
}
}
}
if (typeof name === 'string') {
// register(Blot | Attributor, overwrite)
this.register('formats/' + name, path, target);
} else {
Object.keys(path).forEach((key) => {
this.register(key, path[key], target);
});
}
} else {
if (this.imports[path] != null && !overwrite) {
debug.warn(`Overwriting ${path} with`, target);
}
this.imports[path] = target;
if ((path.startsWith('blots/') || path.startsWith('formats/')) &&
target.blotName !== 'abstract') {
Parchment.register(target);
}
}
}
'blots/block' : Block,
'blots/block/embed' : BlockEmbed,
'blots/break' : Break,
'blots/container' : Container,
'blots/cursor' : Cursor,
'blots/embed' : Embed,
'blots/inline' : Inline,
'blots/scroll' : Scroll,
'blots/text' : TextBlot,
'modules/clipboard' : Clipboard,
'modules/history' : History,
'modules/keyboard' : Keyboard
});
Parchment.register(Block, Break, Cursor, Inline, Scroll, TextBlot);
export default Quill;
'blots/block' : Block,
'blots/block/embed' : BlockEmbed,
'blots/break' : Break,
'blots/container' : Container,
'blots/cursor' : Cursor,
'blots/embed' : Embed,
'blots/inline' : Inline,
'blots/scroll' : Scroll,
'blots/text' : TextBlot,
'modules/clipboard' : Clipboard,
'modules/history' : History,
'modules/keyboard' : Keyboard,
});
Parchment.register(Block, Break, Cursor, Inline, Scroll, TextBlot);
module.exports = Quill;
super.add(node, value);
}
}
}
let Align = new BlockAttributor('align', 'text-align', {
default: 'left',
whitelist: ['left', 'right', 'center', 'justify']
});
let Direction = new BlockAttributor('direction', 'direction', {
default: 'ltr',
whitelist: ['ltr', 'rtl']
});
Parchment.register(Align);
Parchment.register(Direction);
export { Align, Direction, BlockAttributor };
}
}
}
let Align = new BlockAttributor('align', 'text-align', {
default: 'left',
whitelist: ['left', 'right', 'center', 'justify']
});
let Direction = new BlockAttributor('direction', 'direction', {
default: 'ltr',
whitelist: ['ltr', 'rtl']
});
Parchment.register(Align);
Parchment.register(Direction);
export { Align, Direction, BlockAttributor };