# HG changeset patch # User indvd00m (gotoindvdum[at]gmail[dot]com) # Date 1481933688 -10800 # Node ID 467e24fbc60e5e1f11b40487ff16f558390f2a73 # Parent fbe8a276ac78697d29d123b01de7ebb7f2e28c36 Fix using git repo diff -r fbe8a276ac78 -r 467e24fbc60e .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Sat Dec 17 03:14:48 2016 +0300 @@ -0,0 +1,4 @@ +syntax: glob + +syntax: regexp +.*\.git\/.* diff -r fbe8a276ac78 -r 467e24fbc60e ckeditor/plugins/crossreference/README.md --- a/ckeditor/plugins/crossreference/README.md Thu Dec 15 18:17:46 2016 +0300 +++ b/ckeditor/plugins/crossreference/README.md Sat Dec 17 03:14:48 2016 +0300 @@ -3,6 +3,10 @@ Adds cross references links with optional auto-numeration for chapters, images, tables and references. Other types of references can be defined in config. +## Online demo + +Try the plugin demo at . + ## Description Two main conceptions - anchor and link to anchor. There are 4 type of references defined by default: chapter, image, table, reference. Example of anchor of type `image` in raw html: @@ -145,7 +149,7 @@ | `name` | Type name. | String | Yes | | `anchorTextTemplate` | Template for anchor text. This text will be put in `a` tag. You can use variables in format `${variableName}`. Variables is a properties of an anchor object (see [Example of an anchor object](https://github.com/indvd00m/crossreference#example-of-an-anchor-object) section). | String | No | | `linkTextTemplate` | Template for link text. This text will be put in `a` tag. You can use variables in format `${variableName}`. Variables is a properties of an anchor object (see [Example of an anchor object](https://github.com/indvd00m/crossreference#example-of-an-anchor-object) section). | String | No | -| `numeration` | Definition of type numeration. See [Example of a numeration config](https://github.com/indvd00m/crossreference#example-of-a-numeration-config) section. | Object | No | +| `numeration` | Definition of type numeration. See [Example of a numeration definition](https://github.com/indvd00m/crossreference#example-of-a-numeration-definition) section. | Object | No | | `anchorsProvider` | See [Example of type with anchors provider](https://github.com/indvd00m/crossreference#example-of-type-with-anchors-provider) section. | String 'default' or function | No | | `allowCreateAnchors` | Can user create anchors of this type in anchors dialog. | Boolean | No | | `groupAnchors` | If `true`, anchors can be filtered by group in link dialog. | Boolean | No | @@ -233,7 +237,7 @@ ## Installation - 1. Download the plugin. + 1. Download the plugin: https://github.com/indvd00m/crossreference/releases. 2. Extract (decompress) the downloaded file into the plugins folder of your CKEditor installation. @@ -247,7 +251,9 @@ See https://github.com/indvd00m/crossreference/issues. ## Icons: - + +https://icons8.com/web-app/21792/unicast + https://icons8.com/web-app/15117/anchor https://icons8.com/web-app/38051/link diff -r fbe8a276ac78 -r 467e24fbc60e ckeditor/plugins/crossreference/plugin.js --- a/ckeditor/plugins/crossreference/plugin.js Thu Dec 15 18:17:46 2016 +0300 +++ b/ckeditor/plugins/crossreference/plugin.js Sat Dec 17 03:14:48 2016 +0300 @@ -1,7 +1,7 @@ CKEDITOR.plugins.add('crossreference', { lang : [ 'en', 'ru' ], requires : 'dialog,notification', - icons : 'crossreference', + icons : 'crossreference,anchor,link,update', hidpi : true, init : function(editor) { @@ -428,6 +428,7 @@ text = text.replace(/\$\{levelShift\}/g, shift); } + text = text.replace(/\s+/g, ' '); text = text.trim(); return text;