You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
771 B
31 lines
771 B
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; |
|
}); |
|
} |
|
}
|
|
|