I'm coming back with a fundamental question I never been able to solve:
Did someone succeed in implementing templates functionality for Tiny (4.3.2 Revo).
The plugin is present in the component/tinymce folder.
Adding it to the plugin list + adding'template' to button list did the job to activate a popup where you're supposed to pick up a template (html chunks).
Unfortunately this list is empty and I did not find where I have to store html files for those templates, neither if/how to setup this.
However in tiny documentation they talk about ' template_external_list_url' : JavaScript file containing an array of template files. This can be a backend page such as a PHP page.
Well... how this could be achieved in Revo ?
There's a template.list.php file in the component/tinymce folder :
<?php
/**
* @package tinymce
*/
require dirname(__FILE__).'/connector.php';
$templates = $modx->tinymce->getTemplateList();
echo 'var tinyMCETemplateList = '.$modx->toJSON($templates).';';
die();
Any clues ?
thank you
EDIT:
I forgot to precise:
in system parameter there's too a tiny.template_list parameter where you have to enter the list of templates (Nameof TPL:path:description, other one, etc...
This make a list og file to be selectable in the Template popup.
This seams to work BUT the resulting code is NOT the one in the html file.
(for instance a 2 columns chunk like this :
<div>
<div class="col col50">
col1
</div>
<div class="col col50">
col2
</div>
</div>
wich is ok in the popup preview, is immediatly corrupted when inserted and becomes :
[ed. note: elz064 last edited this post 11 years, 11 months ago.]