Tiny MCE Editor For Symfony Framework

TinyMCE is a powerful WYSIWYG editor control for web browsers such as MSIE or Mozilla that enables the user to edit HTML contents in a more user friendly way. The editor control is very flexible and it’s built for integration purposes (usage within systems like Intranets, CMS, and LMS, for example).

TinyMCE is developed by Moxiecode Systems AB and is currently released under the “LGPL” license.

TinyMCE has no direct requirements except for browser compatibility and, of course, JavaScript needs to be turned on.

There is NO back-end code distributed with TinyMCE.

How to use tinyMCE
Step 1 :
Download tinyMCE from this link :http://tinymce.moxiecode.com/

Step 2 : Extract tinyMCE zip file .

Step 3 : Copy tinymce/jscripts/tiny_mce folder
into
symfonyProjectName(any name)/web/js/

Step 4 : sfproject(say symfony project name)/apps/myapp(say application name)/config/settings.yml

copy this code to settings.yml file

all:
.settings:
rich_text_js_dir: js/tiny_mce

Step 5 : Goto your page where you want to put tinyMCE editor and copy following code there :

tinyMCE.init({
// General options
mode : “textareas”,
theme : “advanced”,
plugins : “safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager”,

// Theme options
theme_advanced_buttons1 : “formatselect,fontselect,fontsizeselect”,
theme_advanced_buttons2 : “cut,copy,paste,|,insertdate,inserttime,|,forecolor,backcolor,|,styleprops,spellchecker,”,
theme_advanced_buttons3 : “tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen”,
theme_advanced_buttons4 : “insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage”,

theme_advanced_toolbar_location : “top”,
theme_advanced_toolbar_align : “left”,
theme_advanced_statusbar_location : “bottom”,
theme_advanced_resizing : false,

// Example content CSS (should be your site CSS)
//content_css : “$texteditorpath”,

// Drop lists for link/image/media/template dialogs
//template_external_list_url : “js/template_list.js”,
//external_link_list_url : “js/link_list.js”,
//external_image_list_url : “js/image_list.js”,
//media_external_list_url : “js/media_list.js”,

// Replace values for the template plugin
template_replace_values : {
username : “symfony”,
staffid : “symfony”
}
});

Step 5 : run symfony project 🙂

External links:
For FAQ :
http://wiki.moxiecode.com/index.php/TinyMCE:FAQ

http://wiki.moxiecode.com/index.php/TinyMCE:About

Advertisements

6 Responses

  1. tes
    tes
    tes
    tes
    tes

  2. There is a much easier way to implement tinymce into symfony, in fact it comes built into symfony by default using sfRichTextEditor

    You can also use sfFormExtraPlugin or other plugins to install it. You never have to put javascript in the view…. configuration is set in app.yml

  3. whoa! thanks for the info!

  4. Пора переименовать блог, присвоив название связанное с доменами 🙂 может хватит про них?

  5. Нет,по настоящиму улыбнул 8 пункт,просто представил такую ситуацию ))).

  6. Nice. Thnx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: