const defaultOptions = {
    name: 'paragraph',
    tag: 'P',
    attributes: ['class="paragraph"'],
    marks: [
        {
            tag: 'P',
            attributes: [],
        },
        {
            tag: 'DIV',
            attributes: [],
        },
    ],
};
const paragraphPlugin = (opts) => ({
    register(textarena) {
        const { name, tag, attributes, marks, } = Object.assign(Object.assign({}, defaultOptions), (opts || {}));
        const arena = textarena.registerArena({
            name,
            tag,
            attributes,
            hasText: true,
        }, marks);
        textarena.setDefaultTextArena(arena);
        textarena.registerCommand('convert-to-paragraph', (ta, selection) => ta.applyArenaToSelection(selection, arena));
        textarena.registerShortcut('Alt + Digit0', 'convert-to-paragraph');
        textarena.registerTool({
            name: 'paragraph',
            title: 'Paragraph',
            icon: '<b>¶</b>',
            shortcut: 'Alt + Digit0',
            hint: '0',
            command: 'convert-to-paragraph',
            checkStatus: (node) => node.arena === arena,
        });
        textarena.addSimpleArenas(arena);
    },
});
export default paragraphPlugin;
//# sourceMappingURL=paragraphPlugin.js.map