import { Plugin } from 'ckeditor5/src/core'; import { ButtonView } from 'ckeditor5/src/ui'; /** * Minimal citation picker for Drupal CKEditor5 (sandbox). * * NOTE: This source file is not used by Drupal unless you build it. * The build output lives in ../build/footnotepicker2.js */ export default class FootnotePicker2 extends Plugin { init() { const editor = this.editor; editor.ui.componentFactory.add('footnotePicker2', (locale) => { const button = new ButtonView(locale); button.set({ label: 'Reference Footnotes', withText: true, tooltip: 'Insert reference footnote', }); button.on('execute', () => { // Implemented in the built file for now. }); return button; }); } }