peof template == 'function') template = template.apply(editor)

        // Popup buttons.
        var popup_buttons = ''

        // Create the list of buttons.
        if (editor.opts.popupButtons.length > 1) {
          popup_buttons += '<div class="fr-buttons fr-tabs">'
          popup_buttons += editor.button.buildList(editor.opts.popupButtons)
          popup_buttons += '</div>'
        }

        // Load popup template.
        var template = {
          buttons: popup_buttons,
          custom_layer: