Tinymce features

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
please put the following to tinyMCE general options (admin/shared/richeditor.cshtml) to remove unexpected p tag and double newlines. Currently, new texting will be added a p tag which is not necessary.

           forced_root_block: false,
            force_p_newlines: false,
            remove_linebreaks: false,
            force_br_newlines: true,              //btw, I still get <p> tags if this is false
            remove_trailing_nbsp: false,

also, an important feature that is missed out in tiny_mce is Content Template (http://docs.cksource.com/CKEditor_3.x/Users_Guide/Document/Templates) which helps customers to align their image properly without knowing html tag (float: lelf, right...)

i see there's template plugin on tiny_mce but don't know how to write a template. and why don't we use CKeditor instead of tiny_mce ??

Thanks.
12 years ago
how to create template is here

http://www.tinymce.com/wiki.php/Plugin:template

and

http://forums.modx.com/index.php/topic,31097.msg188847.html

quote

Another one: how to add a template button to the TinyMCE WYSIWYG editor. This allows you to give your content editors a library of ready made html 'templates' that they can use insert into the content of the page. This can be very handy, if, say, you need a arbitary right aligned images and caption that could appear once or multiple times within the page content.

Add templates as html files to /assets/templates/, eg images-row-1-left.html might look like this:


<table align="left" width="186" border="0" cellspacing="0" cellpadding="0" summary="" class="figure left">
  <tr valign="top">
   <td><img src="/assets/images/blank.gif" alt="" width="162" height="135" /></td>
  </tr>
  <tr valign="top">  
<td><h4>Caption</h4><p>Description</p></td>
  </tr></table>

Then add a templates list to /assets/plugins/tinymce212/tinymce.functions.php at around line 202


$tinymceInit .= "         template_templates : [            { title : \"Images - single\", src : \"/assets/templates/images-row-1.html\", description : \"Add single image + caption \" },            { title : \"Images - single - aligned left\", src : \"/assets/templates/images-row-1-left.html\", description : \"Add single image, aligned left + caption \" },            { title : \"Images - single - aligned right\", src : \"/assets/templates/images-row-1-right.html\", description : \"Add single image, aligned right + caption \" },            { title : \"Images - 2 in a row\", src : \"/assets/templates/images-row-2.html\", description : \"Add 2 images in a row + caption\" },            { title : \"Images - 3 in a row\", src : \"/assets/templates/images-row-3.html\", description : \"Add 3 images in a row + caption\" },            { title : \"Images - 4 in a row\", src : \"/assets/templates/images-row-4.html\", description : \"Add 4 images in a row + caption\" }        ]".",\n";


Finally, add 'template' to the TinyMCE custom button configuration string in the Manager under Tools > Configuration > Interface & features, eg on button row 2:
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.