This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorials:design_adv:examples:tiny_mce [2009/06/04 17:10] jonyo linked text |
tutorials:design_adv:examples:tiny_mce [2014/09/25 16:55] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Customizing the TinyMCE Display (WYSIWYG editor) ====== | + | ====== Customizing the TinyMCE Display (WYSIWYG editor) |
<tip c w> | <tip c w> | ||
Line 8: | Line 8: | ||
</ | </ | ||
- | This tutorial will specifically walk you through the process of removing the URL link/unlink buttons from the WYSIWYG editor in the software. | + | This tutorial will specifically walk you through the process of removing the URL link/unlink buttons from the WYSIWYG editor in the software. |
===== What you need ===== | ===== What you need ===== | ||
**Skills** | **Skills** | ||
- | * Comfortable with using FTP (to upload and download template files from your site) < | ||
* Basic understanding of how HTML, Smarty Templates, and/or PHP works will help. < | * Basic understanding of how HTML, Smarty Templates, and/or PHP works will help. < | ||
Line 18: | Line 17: | ||
**Handy tools when editing template files:** | **Handy tools when editing template files:** | ||
* [[http:// | * [[http:// | ||
- | * [[http://wiki.moxiecode.com/index.php/TinyMCE: | + | * [[http://www.tinymce.com/wiki.php/Configuration3x: |
<tip c n> | <tip c n> | ||
Line 24: | Line 23: | ||
====== Customizing the TinyMCE Configuration ====== | ====== Customizing the TinyMCE Configuration ====== | ||
- | - First create a new template set if you have not already done so. The template you will be customizing | + | - First copy the template file from the default |
- | - Copy the file **geo_templates/default/system/tinymce.tpl** into your new template set, the new location should be **geo_templates/ | + | - In the admin, at [[admin_menu/design/manager/start|Design > Manager]], navigate to the folder |
- | - Open the file **geo_templates/ | + | |
- Figure out what configuration changes you want to make. You can find the following documentation for TinyMCE: | - Figure out what configuration changes you want to make. You can find the following documentation for TinyMCE: | ||
- | * [[http://wiki.moxiecode.com/index.php/TinyMCE: | + | * [[http://www.tinymce.com/wiki.php/Configuration3xn|configuration]] < |
- | * [[http://wiki.moxiecode.com/index.php/TinyMCE:Control_reference|button controls]] < | + | * [[http://www.tinymce.com/wiki.php/TinyMCE3x:How-tos|how to's]] < |
- | * [[http://wiki.moxiecode.com/index.php/TinyMCE:Index|Table of Contents]] (the rest of the pages under " | + | * [[http://www.tinymce.com/wiki.php/TinyMCE3x:TinyMCE_3.x|Table of Contents]] (the rest of the pages under " |
< | < | ||
- | - Since this is a tutorial specifically for removing the link and unlink buttons, we've done the research for you! To accomplish this task, edit the file **geo_templates/ | + | - Since this is a tutorial specifically for removing the link and unlink buttons, we've done the research for you! To accomplish this task, find the following line in the template file: |
theme_advanced_disable : ' | theme_advanced_disable : ' | ||
We will be adding **, | We will be adding **, | ||
Line 38: | Line 36: | ||
< | < | ||
- Save and upload the changes to the file, and try it out. The link and unlink buttons should no longer be displayed on the editor. < | - Save and upload the changes to the file, and try it out. The link and unlink buttons should no longer be displayed on the editor. < | ||
- | - If anything goes wrong and you are on a live site, keep in mind to get back to using the default template quickly, | + | - If anything goes wrong and you are on a live site, keep in mind to get back to using the default template quickly, |
===== Further TinyMCE Tips ===== | ===== Further TinyMCE Tips ===== | ||
* Since **tinymce.tpl** is a **System template**, it is subject to change in a new version just like any of the other system templates, which means it is possible that your custom template might break things when you update. | * Since **tinymce.tpl** is a **System template**, it is subject to change in a new version just like any of the other system templates, which means it is possible that your custom template might break things when you update. | ||
- | * Most changes to the TinyMCE configuration will be done in the file **geo_templates/ | + | * Most changes to the TinyMCE configuration will be done in the file **geo_templates/ |
<code html> | <code html> | ||
- | tinyMCE.init({ldelim} | + | tinyMCE.init({ldelim} |
- | theme : ' | + | theme : ' |
- | language : ' | + | language : ' |
- | mode : ' | + | mode : ' |
- | plugins: ' | + | plugins: ' |
- | editor_selector : ' | + | editor_selector : ' |
- | {if $blank_screen_fix}strict_loading_mode : true, | + | {if $blank_screen_fix}strict_loading_mode : true, |
- | theme_advanced_disable : ' | + | theme_advanced_disable : ' |
- | theme_advanced_buttons3_add : ' | + | theme_advanced_buttons3_add : ' |
- | {if $width > 0} | + | extended_valid_elements : " |
- | width: ' | + | {if $width > 0} |
- | {/if} | + | width: ' |
- | {if $height > 0} | + | {/if} |
- | height: ' | + | {if $height > 0} |
- | {/if} | + | height: ' |
- | content_css: | + | {/if} |
- | }); | + | //make it NOT automatically add the <p> around everything... |
+ | forced_root_block : '', | ||
+ | |||
+ | content_css: | ||
+ | }); | ||
</ | </ | ||
For instance, if you wanted to add a new configuration line, you would add it somewhere in that code snippet. < | For instance, if you wanted to add a new configuration line, you would add it somewhere in that code snippet. < |