Custom Templates
CKEditor add-on
TinyMCE add-on
NEW
N1ED logo
N1ED is united plugin
for all JS+ plugins
N1ED logo Buy in bundle

Configuration

To configure CKEditor & TinyMCE Quick Image Uploader use these keys in config.js file (for CKEditor) or in initialization script (for TinyMCE).

jsplus_custom_templates: String
Default value: Empty array []
Available values: 2D-Array
This is the main parameter is defines templates available for insertion by add-on's popup or dialog.
For example:
config.jsplus_custom_templates = [ 
[ 
'<img src="path/to/your/image.png"/>', 
'<div>some code</div>', 
'html'
], 
[ 
'<div>Text template</div>', 
'Text for insertion', 
'text' 
] 
];

Each second level array is one template.
It's 1-st parameter - code to display in the popup or dialog.
The 2-nd parameter - code to insert into CKEditor's document. The 3-rd one is type of code to insert: html (HTML code) or text (plain text).

The 2-nd and/or the 3-rd parameter may be omited. If the 3-rd parameter is omited, its value is html by default. If the 2-nd and the 3-rd parameters are omited, the 2-nd parameter is equals to the 1-st, and the 3-rd is html.

Please note that the template must have one root tag (it is CKEditor's limitation). If you have more than one root tags, please wrap them with one root {{div>.

jsplus_custom_templates_use_dialog: Boolean
Default value: false
Available values: true, false
If this flag is set to true, the dialog will be shown instead of popup box.
jsplus_custom_templates_popup_width: Integer
Default value: 400
The width of the popup. Used only when jsplus_custom_templates_use_dialog is false.
jsplus_custom_templates_dialog_width: Integer
Default value: 400
The width of the dialog. Used in case you have configured this add-on to be displayed as dialog.
jsplus_custom_templates_dialog_height: Integer
Default value: 400
The width of the dialog. Used in case you have configured this add-on to be displayed as dialog.