Template Syntax Demo
Template syntax demo
WysiwygPro's can process basic template tags.
In this demo we have configured a template tag {site_url} that the editor should use instead of the URL of this website. To test this switch to source view and look at the source of the image in the center of the document.
Source code:
<?php
include_once('wysiwygPro/wysiwygPro.class.php');
// create a new WysiwygPro instance
$editor = new wysiwygPro();
// load base configuration
$editor->loadPlugin('demoConfig');
// give the editor a name
$editor->name = 'demo';
// load and configure the template filter plugin
$editor->loadPlugin('templateFilter');
$editor->plugins['templateFilter']->protect('{','}');
$editor->plugins['templateFilter']->assign('{site_url}','http://www.wysiwygpro.com');
// display the editor
$editor->display(700, 400);
?>
We are using a plugin "demoConfig" to apply shared configuration settings such as the file manager configuration. See the source code for this plugin.
WysiwygPro version 3.2.1