From a888e04c22bf39aa2a2f00e4400a96238538db4c Mon Sep 17 00:00:00 2001 From: LMS235 Date: Wed, 24 Jun 2020 13:55:54 +0200 Subject: [PATCH] Add support for sapnotelink Add support for sapnotelink (https://www.dokuwiki.org/plugin:sapnotelink) --- ckeditor/plugins/sapnotelink/README.md | 12 +++++++ .../sapnotelink/dialogs/sapnotelink.js | 30 ++++++++++++++++++ .../plugins/sapnotelink/icons/sapnotelink.png | Bin 0 -> 285 bytes ckeditor/plugins/sapnotelink/lang/de.js | 6 ++++ ckeditor/plugins/sapnotelink/lang/en.js | 6 ++++ ckeditor/plugins/sapnotelink/plugin.js | 15 +++++++++ 6 files changed, 69 insertions(+) create mode 100644 ckeditor/plugins/sapnotelink/README.md create mode 100644 ckeditor/plugins/sapnotelink/dialogs/sapnotelink.js create mode 100644 ckeditor/plugins/sapnotelink/icons/sapnotelink.png create mode 100644 ckeditor/plugins/sapnotelink/lang/de.js create mode 100644 ckeditor/plugins/sapnotelink/lang/en.js create mode 100644 ckeditor/plugins/sapnotelink/plugin.js diff --git a/ckeditor/plugins/sapnotelink/README.md b/ckeditor/plugins/sapnotelink/README.md new file mode 100644 index 00000000..5353b845 --- /dev/null +++ b/ckeditor/plugins/sapnotelink/README.md @@ -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. \ No newline at end of file diff --git a/ckeditor/plugins/sapnotelink/dialogs/sapnotelink.js b/ckeditor/plugins/sapnotelink/dialogs/sapnotelink.js new file mode 100644 index 00000000..b79ad776 --- /dev/null +++ b/ckeditor/plugins/sapnotelink/dialogs/sapnotelink.js @@ -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); + } + }; +}); \ No newline at end of file diff --git a/ckeditor/plugins/sapnotelink/icons/sapnotelink.png b/ckeditor/plugins/sapnotelink/icons/sapnotelink.png new file mode 100644 index 0000000000000000000000000000000000000000..383a2c60cc9fad80ac3dfedba2cb2508316d1d99 GIT binary patch literal 285 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!A+hnjv*HQ$$$R;w`W#u;PjfzE73S3NBzn7 zGmR1qpW069bSUt+%&tk%FcM?%OghoX;4_c)2&1M&b(UrX6Wh6YO&4xFQBaWbnIy_~ zEbSss`ejMUOP4Nrm@`CvJ~Pu;($k0`);MIw!~Gx6{Qut{`@5$}a?