Yii Framework Forum: How to add custom template to TinyMCE's template plugin - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to add custom template to TinyMCE's template plugin Rate Topic: -----

#1 User is offline   vpk369 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 08-August 11
  • Location:NYC

Posted 18 October 2011 - 11:59 AM

Can anyone help me how to add a custom template to TinyMCE's template plugin? When i tried to use the plugin, i don't see any default template available in the templates' dropdownlist.
0

#2 User is offline   Srinivasan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 35
  • Joined: 22-February 11
  • Location:Trichy, TN, INDIA

Posted 11 August 2012 - 01:55 AM

You should use 'template_templates' param in 'options' as follow

<?php 
$this->widget('application.extensions.tinymce.ETinyMce',
		array(
			'name'=>'Article[content]',
			'options'=> array(
				'theme'=>'advanced',
				'skin' => 'o2k7',
				'plugins' => '...,...,...,template',
				'theme_advanced_buttons1' => '...',
				'theme_advanced_buttons2' => '...',
				'theme_advanced_buttons3' => '...',
				'theme_advanced_buttons4' => '...,template,...',

				'template_templates' => array(
						array(
							'title'=>'Editor Details',
							'src'=>'editor_details.html',
							'description'=>'Adds Editor Name and Staff ID'
						),
						...,
						...,
					),
				'width'=>720,
				),
			)
		); ?>

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users