@ -0,0 +1,7 @@
|
||||
name: 'BibCite Footnotes' |
||||
type: module |
||||
description: 'Inline footnote links for BibCite References' |
||||
core: 8.x |
||||
package: 'Bibcite' |
||||
dependencies: |
||||
- bibcite |
@ -0,0 +1,35 @@
|
||||
<?php |
||||
|
||||
/** |
||||
* @file |
||||
* Contains bibcite_footnotes.module. |
||||
*/ |
||||
|
||||
use Drupal\Core\Routing\RouteMatchInterface; |
||||
|
||||
/** |
||||
* Implements hook_help(). |
||||
*/ |
||||
function bibcite_footnotes_help($route_name, RouteMatchInterface $route_match) { |
||||
switch ($route_name) { |
||||
// Main module help for the bibcite_footnotes module. |
||||
case 'help.page.bibcite_footnotes': |
||||
$output = ''; |
||||
$output .= '<h3>' . t('About') . '</h3>'; |
||||
$output .= '<p>' . t('Inline footnote links for BibCite References') . '</p>'; |
||||
return $output; |
||||
|
||||
default: |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* Implements hook_theme(). |
||||
*/ |
||||
function bibcite_footnotes_theme() { |
||||
return [ |
||||
'bibcite_footnotes' => [ |
||||
'render element' => 'children', |
||||
], |
||||
]; |
||||
} |
@ -0,0 +1,59 @@
|
||||
(function() { |
||||
function referenceFootnotesDialog( editor, isEdit ) { |
||||
return { |
||||
title : Drupal.t('Reference Footnotes Dialog'), |
||||
minWidth : 500, |
||||
minHeight : 50, |
||||
contents : [ |
||||
{ |
||||
id: 'info', |
||||
label: Drupal.t('Add a reference footnote'), |
||||
title: Drupal.t('Add a reference footnote'), |
||||
elements: |
||||
[ |
||||
{ |
||||
id: 'reference_footnote', |
||||
type: 'select', |
||||
items: editor.config.referenceFootnotes_list, |
||||
label: Drupal.t('Reference Footnote item:'), |
||||
setup: function (element) { |
||||
if (isEdit) |
||||
this.setValue(element.getText()); |
||||
} |
||||
}, |
||||
{ |
||||
id: 'value', |
||||
type: 'text', |
||||
label: Drupal.t('Value :'), |
||||
labelLayout: 'horizontal', |
||||
style: 'float:left;width:100px;', |
||||
setup: function (element) { |
||||
if (isEdit) |
||||
this.setValue(element.getAttribute('value')); |
||||
} |
||||
} |
||||
], |
||||
} |
||||
], |
||||
onShow : function() { |
||||
if (isEdit) { |
||||
this.fakeObj = CKEDITOR.plugins.reference_footnotes.getSelectedFootnote( editor ); |
||||
this.realObj = editor.restoreRealElement( this.fakeObj ); |
||||
} |
||||
this.setupContent( this.realObj ); |
||||
}, |
||||
onOk : function() { |
||||
CKEDITOR.plugins.reference_footnotes.createFootnote( editor, this.realObj, this.getValueOf('info', 'reference_footnote'), this.getValueOf('info', 'value')); |
||||
delete this.fakeObj; |
||||
delete this.realObj; |
||||
} |
||||
} |
||||
} |
||||
|
||||
CKEDITOR.dialog.add( 'createfootnotes', function( editor ) { |
||||
return referenceFootnotesDialog( editor ); |
||||
}); |
||||
CKEDITOR.dialog.add( 'editfootnotes', function( editor ) { |
||||
return referenceFootnotesDialog( editor, 1 ); |
||||
}); |
||||
})(); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'af', { |
||||
anchor: 'Anker', |
||||
flash: 'Flash animasie', |
||||
hiddenfield: 'Verborge veld', |
||||
iframe: 'IFrame', |
||||
unknown: 'Onbekende objek' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'ar', { |
||||
anchor: 'إرساء', |
||||
flash: 'رسم متحرك بالفلاش', |
||||
hiddenfield: 'إدراج حقل خفي', |
||||
iframe: 'iframe', |
||||
unknown: 'عنصر غير معروف' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'bg', { |
||||
anchor: 'Кука', |
||||
flash: 'Флаш анимация', |
||||
hiddenfield: 'Скрито поле', |
||||
iframe: 'IFrame', |
||||
unknown: 'Неизвестен обект' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'bn', { |
||||
anchor: 'Anchor', // MISSING
|
||||
flash: 'Flash Animation', // MISSING
|
||||
hiddenfield: 'Hidden Field', // MISSING
|
||||
iframe: 'IFrame', // MISSING
|
||||
unknown: 'Unknown Object' // MISSING
|
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'bs', { |
||||
anchor: 'Anchor', |
||||
flash: 'Flash Animation', // MISSING
|
||||
hiddenfield: 'Hidden Field', // MISSING
|
||||
iframe: 'IFrame', // MISSING
|
||||
unknown: 'Unknown Object' // MISSING
|
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'ca', { |
||||
anchor: 'Àncora', |
||||
flash: 'Animació Flash', |
||||
hiddenfield: 'Camp ocult', |
||||
iframe: 'IFrame', |
||||
unknown: 'Objecte desconegut' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'cs', { |
||||
anchor: 'Záložka', |
||||
flash: 'Flash animace', |
||||
hiddenfield: 'Skryté pole', |
||||
iframe: 'IFrame', |
||||
unknown: 'Neznámý objekt' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'cy', { |
||||
anchor: 'Angor', |
||||
flash: 'Animeiddiant Flash', |
||||
hiddenfield: 'Maes Cudd', |
||||
iframe: 'IFrame', |
||||
unknown: 'Gwrthrych Anhysbys' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'da', { |
||||
anchor: 'Anker', |
||||
flash: 'Flashanimation', |
||||
hiddenfield: 'Skjult felt', |
||||
iframe: 'Iframe', |
||||
unknown: 'Ukendt objekt' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'de', { |
||||
anchor: 'Anker', |
||||
flash: 'Flash-Animation', |
||||
hiddenfield: 'Verstecktes Feld', |
||||
iframe: 'IFrame', |
||||
unknown: 'Unbekanntes Objekt' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'el', { |
||||
anchor: 'Άγκυρα', |
||||
flash: 'Ταινία Flash', |
||||
hiddenfield: 'Κρυφό Πεδίο', |
||||
iframe: 'IFrame', |
||||
unknown: 'Άγνωστο Αντικείμενο' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'en-au', { |
||||
anchor: 'Anchor', // MISSING
|
||||
flash: 'Flash Animation', // MISSING
|
||||
hiddenfield: 'Hidden Field', // MISSING
|
||||
iframe: 'IFrame', // MISSING
|
||||
unknown: 'Unknown Object' // MISSING
|
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'en-ca', { |
||||
anchor: 'Anchor', // MISSING
|
||||
flash: 'Flash Animation', // MISSING
|
||||
hiddenfield: 'Hidden Field', // MISSING
|
||||
iframe: 'IFrame', // MISSING
|
||||
unknown: 'Unknown Object' // MISSING
|
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'en-gb', { |
||||
anchor: 'Anchor', |
||||
flash: 'Flash Animation', |
||||
hiddenfield: 'Hidden Field', |
||||
iframe: 'IFrame', |
||||
unknown: 'Unknown Object' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'en', { |
||||
anchor: 'Anchor', |
||||
flash: 'Flash Animation', |
||||
hiddenfield: 'Hidden Field', |
||||
iframe: 'IFrame', |
||||
unknown: 'Unknown Object' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'eo', { |
||||
anchor: 'Ankro', |
||||
flash: 'FlaŝAnimacio', |
||||
hiddenfield: 'Kaŝita kampo', |
||||
iframe: 'Enlinia Kadro (IFrame)', |
||||
unknown: 'Nekonata objekto' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'es', { |
||||
anchor: 'Ancla', |
||||
flash: 'Animación flash', |
||||
hiddenfield: 'Campo oculto', |
||||
iframe: 'IFrame', |
||||
unknown: 'Objeto desconocido' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'et', { |
||||
anchor: 'Ankur', |
||||
flash: 'Flashi animatsioon', |
||||
hiddenfield: 'Varjatud väli', |
||||
iframe: 'IFrame', |
||||
unknown: 'Tundmatu objekt' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'eu', { |
||||
anchor: 'Aingura', |
||||
flash: 'Flash animazioa', |
||||
hiddenfield: 'Ezkutuko eremua', |
||||
iframe: 'IFrame-a', |
||||
unknown: 'Objektu ezezaguna' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'fa', { |
||||
anchor: 'لنگر', |
||||
flash: 'انیمشن فلش', |
||||
hiddenfield: 'فیلد پنهان', |
||||
iframe: 'IFrame', |
||||
unknown: 'شیء ناشناخته' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'fi', { |
||||
anchor: 'Ankkuri', |
||||
flash: 'Flash animaatio', |
||||
hiddenfield: 'Piilokenttä', |
||||
iframe: 'IFrame-kehys', |
||||
unknown: 'Tuntematon objekti' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'fo', { |
||||
anchor: 'Anchor', |
||||
flash: 'Flash Animation', |
||||
hiddenfield: 'Fjaldur teigur', |
||||
iframe: 'IFrame', |
||||
unknown: 'Ókent Object' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'fr-ca', { |
||||
anchor: 'Ancre', |
||||
flash: 'Animation Flash', |
||||
hiddenfield: 'Champ caché', |
||||
iframe: 'IFrame', |
||||
unknown: 'Objet inconnu' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'fr', { |
||||
anchor: 'Ancre', |
||||
flash: 'Animation Flash', |
||||
hiddenfield: 'Champ caché', |
||||
iframe: 'IFrame', |
||||
unknown: 'Objet inconnu' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'gl', { |
||||
anchor: 'Ancoraxe', |
||||
flash: 'Animación «Flash»', |
||||
hiddenfield: 'Campo agochado', |
||||
iframe: 'IFrame', |
||||
unknown: 'Obxecto descoñecido' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'he', { |
||||
anchor: 'עוגן', |
||||
flash: 'סרטון פלאש', |
||||
hiddenfield: 'שדה חבוי', |
||||
iframe: 'חלון פנימי (iframe)', |
||||
unknown: 'אובייקט לא ידוע' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'hr', { |
||||
anchor: 'Sidro', |
||||
flash: 'Flash animacija', |
||||
hiddenfield: 'Sakriveno polje', |
||||
iframe: 'IFrame', |
||||
unknown: 'Nepoznati objekt' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'hu', { |
||||
anchor: 'Horgony', |
||||
flash: 'Flash animáció', |
||||
hiddenfield: 'Rejtett mezõ', |
||||
iframe: 'IFrame', |
||||
unknown: 'Ismeretlen objektum' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'id', { |
||||
anchor: 'Anchor', // MISSING
|
||||
flash: 'Animasi Flash', |
||||
hiddenfield: 'Kolom Tersembunyi', |
||||
iframe: 'IFrame', |
||||
unknown: 'Obyek Tak Dikenal' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'is', { |
||||
anchor: 'Anchor', // MISSING
|
||||
flash: 'Flash Animation', // MISSING
|
||||
hiddenfield: 'Hidden Field', // MISSING
|
||||
iframe: 'IFrame', // MISSING
|
||||
unknown: 'Unknown Object' // MISSING
|
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'it', { |
||||
anchor: 'Ancora', |
||||
flash: 'Animazione Flash', |
||||
hiddenfield: 'Campo Nascosto', |
||||
iframe: 'IFrame', |
||||
unknown: 'Oggetto sconosciuto' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'ja', { |
||||
anchor: 'アンカー', |
||||
flash: 'Flash Animation', |
||||
hiddenfield: '不可視フィールド', |
||||
iframe: 'IFrame', |
||||
unknown: 'Unknown Object' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'ka', { |
||||
anchor: 'ღუზა', |
||||
flash: 'Flash ანიმაცია', |
||||
hiddenfield: 'მალული ველი', |
||||
iframe: 'IFrame', |
||||
unknown: 'უცნობი ობიექტი' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'ko', { |
||||
anchor: '책갈피', |
||||
flash: '플래시 애니메이션', |
||||
hiddenfield: '숨은 입력 칸', |
||||
iframe: '아이프레임', |
||||
unknown: '알 수 없는 객체' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'ku', { |
||||
anchor: 'لەنگەر', |
||||
flash: 'فلاش', |
||||
hiddenfield: 'شاردنەوەی خانه', |
||||
iframe: 'لەچوارچێوە', |
||||
unknown: 'بەرکارێکی نەناسراو' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'lt', { |
||||
anchor: 'Žymė', |
||||
flash: 'Flash animacija', |
||||
hiddenfield: 'Paslėptas laukas', |
||||
iframe: 'IFrame', |
||||
unknown: 'Nežinomas objektas' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'lv', { |
||||
anchor: 'Iezīme', |
||||
flash: 'Flash animācija', |
||||
hiddenfield: 'Slēpts lauks', |
||||
iframe: 'Iframe', |
||||
unknown: 'Nezināms objekts' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'mk', { |
||||
anchor: 'Anchor', |
||||
flash: 'Flash Animation', // MISSING
|
||||
hiddenfield: 'Hidden Field', // MISSING
|
||||
iframe: 'IFrame', // MISSING
|
||||
unknown: 'Unknown Object' // MISSING
|
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'mn', { |
||||
anchor: 'Зангуу', |
||||
flash: 'Flash Animation', // MISSING
|
||||
hiddenfield: 'Нууц талбар', |
||||
iframe: 'IFrame', // MISSING
|
||||
unknown: 'Unknown Object' // MISSING
|
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'ms', { |
||||
anchor: 'Anchor', // MISSING
|
||||
flash: 'Flash Animation', // MISSING
|
||||
hiddenfield: 'Hidden Field', // MISSING
|
||||
iframe: 'IFrame', // MISSING
|
||||
unknown: 'Unknown Object' // MISSING
|
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'nb', { |
||||
anchor: 'Anker', |
||||
flash: 'Flash-animasjon', |
||||
hiddenfield: 'Skjult felt', |
||||
iframe: 'IFrame', |
||||
unknown: 'Ukjent objekt' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'nl', { |
||||
anchor: 'Interne link', |
||||
flash: 'Flash animatie', |
||||
hiddenfield: 'Verborgen veld', |
||||
iframe: 'IFrame', |
||||
unknown: 'Onbekend object' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'no', { |
||||
anchor: 'Anker', |
||||
flash: 'Flash-animasjon', |
||||
hiddenfield: 'Skjult felt', |
||||
iframe: 'IFrame', |
||||
unknown: 'Ukjent objekt' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'pl', { |
||||
anchor: 'Kotwica', |
||||
flash: 'Animacja Flash', |
||||
hiddenfield: 'Pole ukryte', |
||||
iframe: 'IFrame', |
||||
unknown: 'Nieznany obiekt' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'pt-br', { |
||||
anchor: 'Âncora', |
||||
flash: 'Animação em Flash', |
||||
hiddenfield: 'Campo Oculto', |
||||
iframe: 'IFrame', |
||||
unknown: 'Objeto desconhecido' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'pt', { |
||||
anchor: ' Inserir/Editar Âncora', |
||||
flash: 'Animação Flash', |
||||
hiddenfield: 'Campo oculto', |
||||
iframe: 'IFrame', |
||||
unknown: 'Objeto Desconhecido' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'ro', { |
||||
anchor: 'Inserează/Editează ancoră', |
||||
flash: 'Flash Animation', // MISSING
|
||||
hiddenfield: 'Câmp ascuns (HiddenField)', |
||||
iframe: 'IFrame', // MISSING
|
||||
unknown: 'Unknown Object' // MISSING
|
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'ru', { |
||||
anchor: 'Якорь', |
||||
flash: 'Flash анимация', |
||||
hiddenfield: 'Скрытое поле', |
||||
iframe: 'iFrame', |
||||
unknown: 'Неизвестный объект' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'sk', { |
||||
anchor: 'Kotva', |
||||
flash: 'Flash animácia', |
||||
hiddenfield: 'Skryté pole', |
||||
iframe: 'IFrame', |
||||
unknown: 'Neznámy objekt' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'sl', { |
||||
anchor: 'Sidro', |
||||
flash: 'Flash animacija', |
||||
hiddenfield: 'Skrito polje', |
||||
iframe: 'IFrame', |
||||
unknown: 'Neznan objekt' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'sq', { |
||||
anchor: 'Spirancë', |
||||
flash: 'Objekt flash', |
||||
hiddenfield: 'Fushë e fshehur', |
||||
iframe: 'IFrame', |
||||
unknown: 'Objekt i Panjohur' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'sr-latn', { |
||||
anchor: 'Unesi/izmeni sidro', |
||||
flash: 'Flash Animation', // MISSING
|
||||
hiddenfield: 'Skriveno polje', |
||||
iframe: 'IFrame', // MISSING
|
||||
unknown: 'Unknown Object' // MISSING
|
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'sr', { |
||||
anchor: 'Anchor', // MISSING
|
||||
flash: 'Flash Animation', // MISSING
|
||||
hiddenfield: 'Hidden Field', // MISSING
|
||||
iframe: 'IFrame', // MISSING
|
||||
unknown: 'Unknown Object' // MISSING
|
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'sv', { |
||||
anchor: 'Ankare', |
||||
flash: 'Flashanimation', |
||||
hiddenfield: 'Gömt fält', |
||||
iframe: 'iFrame', |
||||
unknown: 'Okänt objekt' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'tr', { |
||||
anchor: 'Bağlantı', |
||||
flash: 'Flash Animasyonu', |
||||
hiddenfield: 'Gizli Alan', |
||||
iframe: 'IFrame', |
||||
unknown: 'Bilinmeyen Nesne' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'tt', { |
||||
anchor: 'Якорь', |
||||
flash: 'Флеш анимациясы', |
||||
hiddenfield: 'Яшерен кыр', |
||||
iframe: 'IFrame', |
||||
unknown: 'Танылмаган объект' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'ug', { |
||||
anchor: 'لەڭگەرلىك نۇقتا', |
||||
flash: 'Flash جانلاندۇرۇم', |
||||
hiddenfield: 'يوشۇرۇن دائىرە', |
||||
iframe: 'IFrame', |
||||
unknown: 'يوچۇن نەڭ' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'uk', { |
||||
anchor: 'Якір', |
||||
flash: 'Flash-анімація', |
||||
hiddenfield: 'Приховані Поля', |
||||
iframe: 'IFrame', |
||||
unknown: 'Невідомий об\'єкт' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'vi', { |
||||
anchor: 'Điểm neo', |
||||
flash: 'Flash', |
||||
hiddenfield: 'Trường ẩn', |
||||
iframe: 'IFrame', |
||||
unknown: 'Đối tượng không rõ ràng' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'zh-cn', { |
||||
anchor: '锚点', |
||||
flash: 'Flash 动画', |
||||
hiddenfield: '隐藏域', |
||||
iframe: 'IFrame', |
||||
unknown: '未知对象' |
||||
} ); |
@ -0,0 +1,11 @@
|
||||
/* |
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
CKEDITOR.plugins.setLang( 'fakeobjects', 'zh', { |
||||
anchor: '錨點', |
||||
flash: 'Flash 動畫', |
||||
hiddenfield: '隱藏欄位', |
||||
iframe: 'IFrame', |
||||
unknown: '無法辨識的物件' |
||||
} ); |
@ -0,0 +1,183 @@
|
||||
/** |
||||
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. |
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/ |
||||
|
||||
( function() { |
||||
var cssStyle = CKEDITOR.htmlParser.cssStyle, |
||||
cssLength = CKEDITOR.tools.cssLength; |
||||
|
||||
var cssLengthRegex = /^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i; |
||||
|
||||
// Replacing the former CSS length value with the later one, with
|
||||
// adjustment to the length unit.
|
||||
function replaceCssLength( length1, length2 ) { |
||||
var parts1 = cssLengthRegex.exec( length1 ), |
||||
parts2 = cssLengthRegex.exec( length2 ); |
||||
|
||||
// Omit pixel length unit when necessary,
|
||||
// e.g. replaceCssLength( 10, '20px' ) -> 20
|
||||
if ( parts1 ) { |
||||
if ( !parts1[ 2 ] && parts2[ 2 ] == 'px' ) |
||||
return parts2[ 1 ]; |
||||
if ( parts1[ 2 ] == 'px' && !parts2[ 2 ] ) |
||||
return parts2[ 1 ] + 'px'; |
||||
} |
||||
|
||||
return length2; |
||||
} |
||||
|
||||
var htmlFilterRules = { |
||||
elements: { |
||||
$: function( element ) { |
||||
var attributes = element.attributes, |
||||
realHtml = attributes && attributes[ 'data-cke-realelement' ], |
||||
realFragment = realHtml && new CKEDITOR.htmlParser.fragment.fromHtml( decodeURIComponent( realHtml ) ), |
||||
realElement = realFragment && realFragment.children[ 0 ]; |
||||
|
||||
// Width/height in the fake object are subjected to clone into the real element.
|
||||
if ( realElement && element.attributes[ 'data-cke-resizable' ] ) { |
||||
var styles = new cssStyle( element ).rules, |
||||
realAttrs = realElement.attributes, |
||||
width = styles.width, |
||||
height = styles.height; |
||||
|
||||
width && ( realAttrs.width = replaceCssLength( realAttrs.width, width ) ); |
||||
height && ( realAttrs.height = replaceCssLength( realAttrs.height, height ) ); |
||||
} |
||||
|
||||
return realElement; |
||||
} |
||||
} |
||||
}; |
||||
|
||||
CKEDITOR.plugins.add( 'fakeobjects', { |
||||
// jscs:disable maximumLineLength
|
||||
lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
|
||||
// jscs:enable maximumLineLength
|
||||
|
||||
init: function( editor ) { |
||||
// Allow image with all styles and classes plus src, alt and title attributes.
|
||||
// We need them when fakeobject is pasted.
|
||||
editor.filter.allow( 'img[!data-cke-realelement,src,alt,title](*){*}', 'fakeobjects' ); |
||||
}, |
||||
|
||||
afterInit: function( editor ) { |
||||
var dataProcessor = editor.dataProcessor, |
||||
htmlFilter = dataProcessor && dataProcessor.htmlFilter; |
||||
|
||||
if ( htmlFilter ) { |
||||
htmlFilter.addRules( htmlFilterRules, { |
||||
applyToAll: true |
||||
} ); |
||||
} |
||||
} |
||||
} ); |
||||
|
||||
/** |
||||
* @member CKEDITOR.editor |
||||
* @todo |
||||
*/ |
||||
CKEDITOR.editor.prototype.createFakeElement = function( realElement, className, realElementType, isResizable ) { |
||||
var lang = this.lang.fakeobjects, |
||||
label = lang[ realElementType ] || lang.unknown; |
||||
|
||||
var attributes = { |
||||
'class': className, |
||||
'data-cke-realelement': encodeURIComponent( realElement.getOuterHtml() ), |
||||
'data-cke-real-node-type': realElement.type, |
||||
alt: label, |
||||
title: label, |
||||
align: realElement.getAttribute( 'align' ) || '' |
||||
}; |
||||
|
||||
// Do not set "src" on high-contrast so the alt text is displayed. (#8945)
|
||||
if ( !CKEDITOR.env.hc ) |
||||
attributes.src = CKEDITOR.tools.transparentImageData; |
||||
|
||||
if ( realElementType ) |
||||
attributes[ 'data-cke-real-element-type' ] = realElementType; |
||||
|
||||
if ( isResizable ) { |
||||
attributes[ 'data-cke-resizable' ] = isResizable; |
||||
|
||||
var fakeStyle = new cssStyle(); |
||||
|
||||
var width = realElement.getAttribute( 'width' ), |
||||
height = realElement.getAttribute( 'height' ); |
||||
|
||||
width && ( fakeStyle.rules.width = cssLength( width ) ); |
||||
height && ( fakeStyle.rules.height = cssLength( height ) ); |
||||
fakeStyle.populate( attributes ); |
||||
} |
||||
|
||||
return this.document.createElement( 'img', { attributes: attributes } ); |
||||
}; |
||||
|
||||
/** |
||||
* @member CKEDITOR.editor |
||||
* @todo |
||||
*/ |
||||
CKEDITOR.editor.prototype.createFakeParserElement = function( realElement, className, realElementType, isResizable ) { |
||||
var lang = this.lang.fakeobjects, |
||||
label = lang[ realElementType ] || lang.unknown, |
||||
html; |
||||
|
||||
var writer = new CKEDITOR.htmlParser.basicWriter(); |
||||
realElement.writeHtml( writer ); |
||||
html = writer.getHtml(); |
||||
|
||||
var attributes = { |
||||
'class': className, |
||||
'data-cke-realelement': encodeURIComponent( html ), |
||||
'data-cke-real-node-type': realElement.type, |
||||
alt: label, |
||||
title: label, |
||||
align: realElement.attributes.align || '' |
||||
}; |
||||
|
||||
// Do not set "src" on high-contrast so the alt text is displayed. (#8945)
|
||||
if ( !CKEDITOR.env.hc ) |
||||
attributes.src = CKEDITOR.tools.transparentImageData; |
||||
|
||||
if ( realElementType ) |
||||
attributes[ 'data-cke-real-element-type' ] = realElementType; |
||||
|
||||
if ( isResizable ) { |
||||
attributes[ 'data-cke-resizable' ] = isResizable; |
||||
var realAttrs = realElement.attributes, |
||||
fakeStyle = new cssStyle(); |
||||
|
||||
var width = realAttrs.width, |
||||
height = realAttrs.height; |
||||
|
||||
width !== undefined && ( fakeStyle.rules.width = cssLength( width ) ); |
||||
height !== undefined && ( fakeStyle.rules.height = cssLength( height ) ); |
||||
fakeStyle.populate( attributes ); |
||||
} |
||||
|
||||
return new CKEDITOR.htmlParser.element( 'img', attributes ); |
||||
}; |
||||
|
||||
/** |
||||
* @member CKEDITOR.editor |
||||
* @todo |
||||
*/ |
||||
CKEDITOR.editor.prototype.restoreRealElement = function( fakeElement ) { |
||||
if ( fakeElement.data( 'cke-real-node-type' ) != CKEDITOR.NODE_ELEMENT ) |
||||
return null; |
||||
|
||||
var element = CKEDITOR.dom.element.createFromHtml( decodeURIComponent( fakeElement.data( 'cke-realelement' ) ), this.document ); |
||||
|
||||
if ( fakeElement.data( 'cke-resizable' ) ) { |
||||
var width = fakeElement.getStyle( 'width' ), |
||||
height = fakeElement.getStyle( 'height' ); |
||||
|
||||
width && element.setAttribute( 'width', replaceCssLength( element.getAttribute( 'width' ), width ) ); |
||||
height && element.setAttribute( 'height', replaceCssLength( element.getAttribute( 'height' ), height ) ); |
||||
} |
||||
|
||||
return element; |
||||
}; |
||||
|
||||
} )(); |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 906 B |
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 443 B |
After Width: | Height: | Size: 262 B |
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 225 B |
After Width: | Height: | Size: 813 B |
@ -0,0 +1,109 @@
|
||||
(function() { |
||||
CKEDITOR.plugins.add( 'reference_footnotes', |
||||
{ |
||||
requires : [ 'fakeobjects','dialog' ], |
||||
icons: 'reference_footnotes', |
||||
onLoad: function() { |
||||
var icon_path = window.location.origin + this.path + 'images/fn_icon2.png'; |
||||
CKEDITOR.addCss( |
||||
'.cke_footnote' + |
||||
'{' + |
||||
'background-image: url(' + CKEDITOR.getUrl( icon_path ) + ');' + |
||||
'background-position: center center;' + |
||||
'background-repeat: no-repeat;' + |
||||
'width: 16px;' + |
||||
'height: 16px;' + |
||||
'}' |
||||
); |
||||
}, |
||||
init: function( editor ) |
||||
{ |
||||
editor.addCommand('createfootnotes', new CKEDITOR.dialogCommand('createfootnotes', { |
||||
allowedContent: 'fn[value]' |
||||
})); |
||||
editor.addCommand('editfootnotes', new CKEDITOR.dialogCommand('editfootnotes', { |
||||
allowedContent: 'fn[value]' |
||||
})); |
||||
|
||||
// Drupal Wysiwyg requirement: The first argument to editor.ui.addButton()
|
||||
// must be equal to the key used in $plugins[<pluginName>]['buttons'][<key>]
|
||||
// in hook_wysiwyg_plugin().
|
||||
editor.ui.addButton && editor.ui.addButton( 'reference_footnotes', { |
||||
label: Drupal.t('Add a reference footnote'), |
||||
command: 'createfootnotes', |
||||
icon: 'reference_footnotes' |
||||
}); |
||||
|
||||
if (editor.addMenuItems) { |
||||
editor.addMenuGroup('reference_footnotes', 100); |
||||
editor.addMenuItems({ |
||||
footnotes: { |
||||
label: Drupal.t('Edit footnote'), |
||||
command: 'editfootnotes', |
||||
icon: 'reference_footnotes', |
||||
group: 'reference_footnotes' |
||||
} |
||||
}); |
||||
} |
||||
if (editor.contextMenu) { |
||||
editor.contextMenu.addListener( function( element, selection ) { |
||||
if ( !element || element.data('cke-real-element-type') != 'fn' ) |
||||
return null; |
||||
|
||||
return { footnotes: CKEDITOR.TRISTATE_ON }; |
||||
}); |
||||
} |
||||
|
||||
editor.on( 'doubleclick', function( evt ) { |
||||
if ( CKEDITOR.plugins.footnotes.getSelectedFootnote( editor ) ) |
||||
evt.data.dialog = 'editfootnotes'; |
||||
}); |
||||
|
||||
CKEDITOR.dialog.add( 'createfootnotes', this.path + 'dialogs/footnotes.js' ); |
||||
CKEDITOR.dialog.add( 'editfootnotes', this.path + 'dialogs/footnotes.js' ); |
||||
}, |
||||
afterInit : function( editor ) { |
||||
var dataProcessor = editor.dataProcessor, |
||||
dataFilter = dataProcessor && dataProcessor.dataFilter; |
||||
|
||||
if (dataFilter) { |
||||
dataFilter.addRules({ |
||||
elements: { |
||||
fn: function(element ) { |
||||
return editor.createFakeParserElement( element, 'cke_footnote', 'hiddenfield', false ); |
||||
} |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
}); |
||||
})(); |
||||
|
||||
CKEDITOR.plugins.reference_footnotes = { |
||||
createFootnote: function( editor, origElement, text, value) { |
||||
if (!origElement) { |
||||
var realElement = CKEDITOR.dom.element.createFromHtml('<fn></fn>'); |
||||
} |
||||
else { |
||||
realElement = origElement; |
||||
} |
||||
|
||||
if (text && text.length > 0 ) |
||||
realElement.setText(text); |
||||
if (value && value.length > 0 ) |
||||
realElement.setAttribute('value',value); |
||||
|
||||
var fakeElement = editor.createFakeElement( realElement , 'cke_footnote', 'hiddenfield', false ); |
||||
editor.insertElement(fakeElement); |
||||
}, |
||||
|
||||
getSelectedFootnote: function( editor ) { |
||||
var selection = editor.getSelection(); |
||||
var element = selection.getSelectedElement(); |
||||
var seltype = selection.getType(); |
||||
|
||||
if ( seltype == CKEDITOR.SELECTION_ELEMENT && element.data('cke-real-element-type') == 'hiddenfield') { |
||||
return element; |
||||
} |
||||
} |
||||
}; |
@ -0,0 +1,65 @@
|
||||
<?php |
||||
|
||||
namespace Drupal\bibcite_footnotes\Plugin\CKEditorPlugin; |
||||
|
||||
use Drupal\ckeditor\CKEditorPluginInterface; |
||||
use Drupal\ckeditor\CKEditorPluginButtonsInterface; |
||||
use Drupal\Component\Plugin\PluginBase; |
||||
use Drupal\editor\Entity\Editor; |
||||
|
||||
/** |
||||
* Defines the "FakeObjects" plugin. |
||||
* |
||||
* This is a dependency to footnotes, the source comes from |
||||
* http://ckeditor.com/addon/fakeobjects. |
||||
* |
||||
* @CKEditorPlugin( |
||||
* id = "fakeobjects", |
||||
* label = @Translation("FakeObjects") |
||||
* ) |
||||
*/ |
||||
class FakeObjects extends PluginBase implements CKEditorPluginInterface, CKEditorPluginButtonsInterface { |
||||
|
||||
/** |
||||
* Implements CKEditorPluginInterface::getDependencies(). |
||||
*/ |
||||
public function getDependencies(Editor $editor) { |
||||
return []; |
||||
} |
||||
|
||||
/** |
||||
* Implements CKEditorPluginInterface::getLibraries(). |
||||
*/ |
||||
public function getLibraries(Editor $editor) { |
||||
return []; |
||||
} |
||||
|
||||
/** |
||||
* Implements CKEditorPluginInterface::isInternal(). |
||||
*/ |
||||
public function isInternal() { |
||||
return FALSE; |
||||
} |
||||
|
||||
/** |
||||
* Implements CKEditorPluginInterface::getFile(). |
||||
*/ |
||||
public function getFile() { |
||||
return drupal_get_path('module', 'bibcite_footnotes') . '/js/plugins/reference_footnotes/fakeobjects/plugin.js'; |
||||
} |
||||
|
||||
/** |
||||
* Implements CKEditorPluginButtonsInterface::getButtons(). |
||||
*/ |
||||
public function getButtons() { |
||||
return []; |
||||
} |
||||
|
||||
/** |
||||
* Implements \CKEditorPluginInterface::getConfig(). |
||||
*/ |
||||
public function getConfig(Editor $editor) { |
||||
return []; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,97 @@
|
||||
<?php |
||||
|
||||
namespace Drupal\bibcite_footnotes\Plugin\CKEditorPlugin; |
||||
|
||||
use Drupal\ckeditor\CKEditorPluginBase; |
||||
use Drupal\editor\Entity\Editor; |
||||
|
||||
/** |
||||
* Defines the "reference_footnotes" plugin. |
||||
* |
||||
* NOTE: The plugin ID ('id' key) corresponds to the CKEditor plugin name. |
||||
* It is the first argument of the CKEDITOR.plugins.add() function in the |
||||
* plugin.js file. |
||||
* |
||||
* @CKEditorPlugin( |
||||
* id = "reference_footnotes", |
||||
* label = @Translation("Reference Footnotes") |
||||
* ) |
||||
*/ |
||||
class ReferenceFootnotes extends CKEditorPluginBase { |
||||
|
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
* |
||||
* NOTE: The keys of the returned array corresponds to the CKEditor button |
||||
* names. They are the first argument of the editor.ui.addButton() or |
||||
* editor.ui.addRichCombo() functions in the plugin.js file. |
||||
*/ |
||||
public function getButtons() { |
||||
// Make sure that the path to the image matches the file structure of |
||||
// the CKEditor plugin you are implementing. |
||||
return [ |
||||
'reference_footnotes' => [ |
||||
'label' => t('Reference Footnotes'), |
||||
'image' => drupal_get_path('module', 'bibcite_footnotes') . '/js/plugins/reference_footnotes/images/icon.png', |
||||
], |
||||
]; |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getFile() { |
||||
// Make sure that the path to the plugin.js matches the file structure of |
||||
// the CKEditor plugin you are implementing. |
||||
return drupal_get_path('module', 'bibcite_footnotes') . '/js/plugins/reference_footnotes/plugin.js'; |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function isInternal() { |
||||
return FALSE; |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getDependencies(Editor $editor) { |
||||
return ['fakeobjects']; |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getLibraries(Editor $editor) { |
||||
return []; |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getConfig(Editor $editor) { |
||||
$uid = \Drupal::currentUser()->id(); |
||||
|
||||
$query = \Drupal::service('entity.query'); |
||||
|
||||
$ref_ids = $query |
||||
->get('bibcite_reference') |
||||
->condition('uid', $uid) |
||||
->execute(); |
||||
|
||||
$reference_storage = \Drupal::entityTypeManager()->getStorage('bibcite_reference')->loadMultiple($ref_ids); |
||||
$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))); |
||||
$options[] = [$output, $ref_id]; |
||||
} |
||||
|
||||
return ['referenceFootnotes_list' => $options]; |
||||
} |
||||
|
||||
} |