|
|
@ -12,16 +12,18 @@ |
|
|
|
|
|
|
|
|
|
|
|
Drupal.behaviors.bibciteFootnotesReplaceCitations = { |
|
|
|
Drupal.behaviors.bibciteFootnotesReplaceCitations = { |
|
|
|
attach: function attach(context, settings) { |
|
|
|
attach: function attach(context, settings) { |
|
|
|
|
|
|
|
alert('got here'); |
|
|
|
var formats = drupalSettings.editor.formats; |
|
|
|
if (CKEDITOR.instances) { |
|
|
|
if (formats) { |
|
|
|
for (var instance in CKEDITOR.instances) { |
|
|
|
for (var key in formats) { |
|
|
|
var editor = CKEDITOR.instances[instance]; |
|
|
|
var format = drupalSettings.editor.formats[key]; |
|
|
|
var config = editor.config; |
|
|
|
if (format.editor == "ckeditor") { |
|
|
|
if (config.hasOwnProperty('referenceFootnotes_list')) { |
|
|
|
format.editorSettings.referenceFootnotes_list = drupalSettings.bibcite_footnotes.references; |
|
|
|
config.referenceFootnotes_list = drupalSettings.bibcite_footnotes.references; |
|
|
|
|
|
|
|
var name = editor.name; |
|
|
|
|
|
|
|
editor.destroy(); |
|
|
|
|
|
|
|
CKEDITOR.replace(name, config); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|