]>
Commit | Line | Data |
---|---|---|
7adcb81e | 1 | /**\r |
3b35bd27 | 2 | * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.\r |
7adcb81e IB |
3 | * For licensing, see LICENSE.md or http://ckeditor.com/license\r |
4 | */\r | |
5 | \r | |
6 | // Register a templates definition set named "default".\r | |
7 | CKEDITOR.addTemplates( 'default', {\r | |
8 | // The name of sub folder which hold the shortcut preview images of the\r | |
9 | // templates.\r | |
10 | imagesPath: CKEDITOR.getUrl( CKEDITOR.plugins.getPath( 'templates' ) + 'templates/images/' ),\r | |
11 | \r | |
12 | // The templates definitions.\r | |
13 | templates: [ {\r | |
14 | title: 'Image and Title',\r | |
15 | image: 'template1.gif',\r | |
16 | description: 'One main image with a title and text that surround the image.',\r | |
17 | html: '<h3>' +\r | |
18 | // Use src=" " so image is not filtered out by the editor as incorrect (src is required).\r | |
19 | '<img src=" " alt="" style="margin-right: 10px" height="100" width="100" align="left" />' +\r | |
20 | 'Type the title here' +\r | |
21 | '</h3>' +\r | |
22 | '<p>' +\r | |
23 | 'Type the text here' +\r | |
24 | '</p>'\r | |
25 | },\r | |
26 | {\r | |
27 | title: 'Strange Template',\r | |
28 | image: 'template2.gif',\r | |
29 | description: 'A template that defines two colums, each one with a title, and some text.',\r | |
30 | html: '<table cellspacing="0" cellpadding="0" style="width:100%" border="0">' +\r | |
31 | '<tr>' +\r | |
32 | '<td style="width:50%">' +\r | |
33 | '<h3>Title 1</h3>' +\r | |
34 | '</td>' +\r | |
35 | '<td></td>' +\r | |
36 | '<td style="width:50%">' +\r | |
37 | '<h3>Title 2</h3>' +\r | |
38 | '</td>' +\r | |
39 | '</tr>' +\r | |
40 | '<tr>' +\r | |
41 | '<td>' +\r | |
42 | 'Text 1' +\r | |
43 | '</td>' +\r | |
44 | '<td></td>' +\r | |
45 | '<td>' +\r | |
46 | 'Text 2' +\r | |
47 | '</td>' +\r | |
48 | '</tr>' +\r | |
49 | '</table>' +\r | |
50 | '<p>' +\r | |
51 | 'More text goes here.' +\r | |
52 | '</p>'\r | |
53 | },\r | |
54 | {\r | |
55 | title: 'Text and Table',\r | |
56 | image: 'template3.gif',\r | |
57 | description: 'A title with some text and a table.',\r | |
58 | html: '<div style="width: 80%">' +\r | |
59 | '<h3>' +\r | |
60 | 'Title goes here' +\r | |
61 | '</h3>' +\r | |
62 | '<table style="width:150px;float: right" cellspacing="0" cellpadding="0" border="1">' +\r | |
63 | '<caption style="border:solid 1px black">' +\r | |
64 | '<strong>Table title</strong>' +\r | |
65 | '</caption>' +\r | |
66 | '<tr>' +\r | |
67 | '<td> </td>' +\r | |
68 | '<td> </td>' +\r | |
69 | '<td> </td>' +\r | |
70 | '</tr>' +\r | |
71 | '<tr>' +\r | |
72 | '<td> </td>' +\r | |
73 | '<td> </td>' +\r | |
74 | '<td> </td>' +\r | |
75 | '</tr>' +\r | |
76 | '<tr>' +\r | |
77 | '<td> </td>' +\r | |
78 | '<td> </td>' +\r | |
79 | '<td> </td>' +\r | |
80 | '</tr>' +\r | |
81 | '</table>' +\r | |
82 | '<p>' +\r | |
83 | 'Type the text here' +\r | |
84 | '</p>' +\r | |
85 | '</div>'\r | |
86 | } ]\r | |
87 | } );\r |