Datenstand V1.0
This commit is contained in:
50
ckeditor/plugins/tokens_skonto/plugin.js
Normal file
50
ckeditor/plugins/tokens_skonto/plugin.js
Normal file
@@ -0,0 +1,50 @@
|
||||
CKEDITOR.plugins.add( 'tokens_skonto',
|
||||
{
|
||||
requires : ['richcombo'], //, 'styles' ],
|
||||
init : function( editor )
|
||||
{
|
||||
var config = editor.config,
|
||||
lang = editor.lang.format;
|
||||
|
||||
// Gets the list of tags from the settings.
|
||||
var tags_b = []; //new Array();
|
||||
//this.add('value', 'drop_text', 'drop_label');
|
||||
tags_b[0]=["[Skonto_Gültig]", "Skonto_Gültig", "Skonto_Gültig"];
|
||||
tags_b[1]=["[Skonto_Betrag]", "Skonto_Betrag", "Skonto_Betrag"];
|
||||
tags_b[2]=["[Skonto_Prozent]", "Skonto_Prozent", "Skonto_Prozent"];
|
||||
|
||||
// Create style objects for all defined styles.
|
||||
|
||||
editor.ui.addRichCombo( 'tokens_skonto',
|
||||
{
|
||||
label : "Textbausteine",
|
||||
title : "Textbausteine einfügen",
|
||||
voiceLabel : "Textbausteine einfügen",
|
||||
className : 'cke_format',
|
||||
multiSelect : false,
|
||||
|
||||
panel :
|
||||
{
|
||||
css : [ config.contentsCss, CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ],
|
||||
voiceLabel : lang.panelvoiceLabel
|
||||
},
|
||||
|
||||
init : function()
|
||||
{
|
||||
this.startGroup( "Bearbeiter" );
|
||||
//this.add('value', 'drop_text', 'drop_label');
|
||||
for (var this_tags_b in tags_b){
|
||||
this.add(tags_b[this_tags_b][0], tags_b[this_tags_b][1], tags_b[this_tags_b][2]);
|
||||
}
|
||||
},
|
||||
|
||||
onClick : function( value )
|
||||
{
|
||||
editor.focus();
|
||||
editor.fire( 'saveSnapshot' );
|
||||
editor.insertHtml(value);
|
||||
editor.fire( 'saveSnapshot' );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user