Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ckeditor/plugins/sapnotelink/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# sapnotelink_ckgdoku
Plugin to insert the sapnotelink plugin source code in dokuwiki using the ckgedit editor (https://github.com/turnermm/ckgedit / https://www.dokuwiki.org/plugin:ckgedit).

Dokuwiki sapnotelink from https://www.dokuwiki.org/plugin:sapnotelink

## Installation
Refer to: https://www.dokuwiki.org/plugin:ckgedit:configuration#extra_plugins.
Unzip the files to your `dokuwiki/lib/plugins/ckgedit/ckeditor/plugins/` folder and rename the folder to **sapnotelink**.

## Dokuwiki configuration

Add the text **SAPnotelink** to the dokuwiki **plugin»ckgedit»extra_plugins** configuration.
30 changes: 30 additions & 0 deletions ckeditor/plugins/sapnotelink/dialogs/sapnotelink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
CKEDITOR.dialog.add( 'sapnotelinkDialog', function( editor ) {
return {
title: editor.lang.sapnotelink.title,
minWidth: 400,
minHeight: 200,
contents: [
{
id: 'tab-basic',
label: editor.lang.sapnotelink.title,
elements: [
{
type: 'text',
id: 'sapnotelink',
label: editor.lang.sapnotelink.content,
validate: CKEDITOR.dialog.validate.number( editor.lang.sapnotelink.number )
}
]
}
],
onOk: function() {
var dialog = this;
var notenumber = this.text ? this.text : dialog.getValueOf('tab-basic', 'sapnotelink');
if (!notenumber) {
alert( editor.lang.sapnotelink.empty );
return false
}
editor.insertText('sap#' + notenumber);
}
};
});
Binary file added ckeditor/plugins/sapnotelink/icons/sapnotelink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions ckeditor/plugins/sapnotelink/lang/de.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CKEDITOR.plugins.setLang("sapnotelink","de",{
title: 'SAP Note',
content: 'Notenummer:',
empty: 'Darf nicht leer sein',
number: 'Muss eine Nummer sein',
});
6 changes: 6 additions & 0 deletions ckeditor/plugins/sapnotelink/lang/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CKEDITOR.plugins.setLang("sapnotelink","en",{
title: 'SAP Note',
content: 'Notenumber:',
empty: 'Can not be empty',
number: 'Must be a number',
});
15 changes: 15 additions & 0 deletions ckeditor/plugins/sapnotelink/plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CKEDITOR.plugins.add( 'sapnotelink', {
icons: 'sapnotelink',
lang: 'en,de',
init: function( editor ) {
editor.addCommand( 'sapnotelink', new CKEDITOR.dialogCommand( 'sapnotelinkDialog' ) );
editor.ui.addButton( 'SAPnotelink', {
label: editor.lang.sapnotelink.title,
command: 'sapnotelink',
toolbar: 'insert',
icon: this.path + 'icons/sapnotelink.png'
});

CKEDITOR.dialog.add( 'sapnotelinkDialog', this.path + 'dialogs/sapnotelink.js' );
}
});