CKEDITOR.plugins.add('tickets', {
    requires: 'widget',
    icons: 'tickets',

    init: function(editor) {
        editor.addContentsCss(this.path + 'styles/tickets.css');
        editor.widgets.add('tickets', {
            button: 'Add Ticket Seating Widget',
            allowedContent: 'div(!ticket-seating)',
            requiredContent: 'div(ticket-seating)',

            upcast: function(element) {
                return element.name == 'div' && element.hasClass('ticket-seating');
            },

            template:
                '<div class="ticket-seating">' +
                    '<p>Ticket Seating Widget</p>' +
                '</div>'
        });
    }
});
