1 CrossReference Plugin for CKEditor 4 |
1 CrossReference Plugin for CKEditor 4 |
2 ================================= |
2 ================================= |
3 |
3 |
4 Adds cross references links with optional auto-numeration for chapters, images, tables and references. Other types of references can be defined in config. |
4 Adds cross references links with optional auto-numeration for chapters, images, tables and references. Other types of references can be defined in config. |
|
5 |
|
6 ## Online demo |
|
7 |
|
8 Try the plugin demo at <http://indvd00m.com/crossreference/>. |
5 |
9 |
6 ## Description |
10 ## Description |
7 |
11 |
8 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: |
12 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: |
9 ```html |
13 ```html |
143 | Property | Description | Type | Required | |
147 | Property | Description | Type | Required | |
144 | --- | --- | --- | --- | |
148 | --- | --- | --- | --- | |
145 | `name` | Type name. | String | Yes | |
149 | `name` | Type name. | String | Yes | |
146 | `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 | |
150 | `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 | |
147 | `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 | |
151 | `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 | |
148 | `numeration` | Definition of type numeration. See [Example of a numeration config](https://github.com/indvd00m/crossreference#example-of-a-numeration-config) section. | Object | No | |
152 | `numeration` | Definition of type numeration. See [Example of a numeration definition](https://github.com/indvd00m/crossreference#example-of-a-numeration-definition) section. | Object | No | |
149 | `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 | |
153 | `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 | |
150 | `allowCreateAnchors` | Can user create anchors of this type in anchors dialog. | Boolean | No | |
154 | `allowCreateAnchors` | Can user create anchors of this type in anchors dialog. | Boolean | No | |
151 | `groupAnchors` | If `true`, anchors can be filtered by group in link dialog. | Boolean | No | |
155 | `groupAnchors` | If `true`, anchors can be filtered by group in link dialog. | Boolean | No | |
152 |
156 |
153 ### Example of a numeration definition |
157 ### Example of a numeration definition |
231 |
235 |
232 CrossReference Plugin require CKEditor 4.5+ version and dependent from plugins: dialog, notification. |
236 CrossReference Plugin require CKEditor 4.5+ version and dependent from plugins: dialog, notification. |
233 |
237 |
234 ## Installation |
238 ## Installation |
235 |
239 |
236 1. Download the plugin. |
240 1. Download the plugin: https://github.com/indvd00m/crossreference/releases. |
237 |
241 |
238 2. Extract (decompress) the downloaded file into the plugins folder of your |
242 2. Extract (decompress) the downloaded file into the plugins folder of your |
239 CKEditor installation. |
243 CKEditor installation. |
240 Example: http://example.com/ckeditor/plugins/crossreference |
244 Example: http://example.com/ckeditor/plugins/crossreference |
241 |
245 |