Browse Source

Upgrade to release v2.4.0

Kartik Visweswaran 11 years ago
parent
commit
dfe23040d4
1 changed files with 12 additions and 1 deletions
  1. 12 1
      README.md

+ 12 - 1
README.md

@@ -283,7 +283,18 @@ _object_ the templates configuration for rendering each preview file type. The f
 - `audio`: the preview template for audio files (supported by HTML 5 audio tag).
 - `audio`: the preview template for audio files (supported by HTML 5 audio tag).
 - `flash`: the preview template for flash files (supported currently on webkit browsers).
 - `flash`: the preview template for flash files (supported currently on webkit browsers).
 - `object`: the preview template for all other files - by default treated as object. To disable this behavior, configure the `allowedPreviewTypes` property.
 - `object`: the preview template for all other files - by default treated as object. To disable this behavior, configure the `allowedPreviewTypes` property.
-- `generic`: this template is used ONLY for rendering the `initialPreview` markup content passed directly as a raw format. The special tag `{content}` will be parsed and replaced with the `initialPreview` markup.
+- `generic`: this template is used ONLY for rendering the `initialPreview` markup content passed directly as a raw format. 
+
+The following tags will be parsed and replaced in each of the templates:
+
+- `{previewId}`: will be replaced with the generated identifier for the preview frame container.
+- `{data}`: will be replaced with the data source for each preview type.
+- `{width}`: will be replaced with the width for the file type as set in `previewSettings`.
+- `{height}`: will be replaced with the height for the file type as set in `previewSettings`.
+- `{caption}`: will be replaced with the file name.
+- `{type}`: will be replaced with the file type.
+- `{content}`: this is applicable only for the `generic` template. It will be  with the raw HTML markup as set in `initialPreview`. None of 
+   the above tags will be parsed for the `generic` template.
 
 
 As noted, if you are coming from an earlier release (before v2.4.0), all preview templates have now been combined into one property, instead of separate templates for image, text etc. 
 As noted, if you are coming from an earlier release (before v2.4.0), all preview templates have now been combined into one property, instead of separate templates for image, text etc.