diff --git a/bibcite_footnotes.module b/bibcite_footnotes.module
index 9bd4f14..f72a0d6 100644
--- a/bibcite_footnotes.module
+++ b/bibcite_footnotes.module
@@ -33,3 +33,56 @@ function bibcite_footnotes_theme() {
],
];
}
+
+function bibcite_footnotes_theme_registry_alter(&$theme_registry) {
+ $theme_registry['footnote_list']['function'] = 'bibcite_footnotes_theme_footnote_list';
+}
+
+function bibcite_footnotes_theme_footnote_list($footnotes) {
+ // @todo: change this ugly array for arguments in the function.
+ $footnotes = $footnotes['footnotes']['#footnotes'];
+ $str = '
\nThat's all, folks";
+ return $str;
+
+}
\ No newline at end of file
diff --git a/src/Plugin/CKEditorPlugin/ReferenceFootnotes.php b/src/Plugin/CKEditorPlugin/ReferenceFootnotes.php
index 8beb2b7..1851a21 100644
--- a/src/Plugin/CKEditorPlugin/ReferenceFootnotes.php
+++ b/src/Plugin/CKEditorPlugin/ReferenceFootnotes.php
@@ -85,11 +85,11 @@ class ReferenceFootnotes extends CKEditorPluginBase {
$view_builder = \Drupal::entityTypeManager()->getViewBuilder('bibcite_reference');
$options = [];
foreach($reference_storage as $ref_id => $ref_item) {
- print_r($ref_id);
$build = $view_builder->view($ref_item, 'citation');
- $output = trim(strip_tags(render($build)));
+ $render = render($build);
+ $output = trim(strip_tags($render));
//$options[] = [$output, $ref_id];
- $options[] = [$output, $output];
+ $options[] = [$output, "[bibcite_reference:$ref_id]"];
}
return ['referenceFootnotes_list' => $options];