Archive

Posts Tagged ‘FCKeditor’

Why more CF developers choose FCKeditor, and a TinyMCE CFC

March 4th, 2009

Last week I posted a poll asking CF developers why they preferred FCKeditor over TinyMCE. Here are the results as of 3/2/09.

Quality / reliability 5 (50%)
It’s a simple tag (part of cftextarea) 3 (30%)
Extendability 2 (20%)

Which I have mixed feelings about. The first feeling is, ‘wow only 10 voters’ haha! Then, I thought that its great to use a built in function to get work done fast. That’s kind of what CF is all about. But at the same time I feel it’s more important to deliver to the end client the nicest looking/performing product.

Now, I don’t have anything against FCKeditor. But I really like TinyMCE. If you followed me on Twitter or this blog you’d know that. So what I’m prepared to do is give away a really great ColdFusion Function that makes rendering a TinyMCE instance a snap:

<cfoutput>
	<tr>
		<td>
			#application.includes.tinymce(
				content='',
				element="en",
				csswidth="444px",
				resizing=true,
				theme='advanced',
				theme_advanced_buttons1 = "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,code,cleanup",
				theme_advanced_buttons2 = "",
				theme_advanced_buttons3 = ""
			)#
		</td>
		<td>
			#application.includes.tinymce(
				content='',
				element="es",
				csswidth="444px",
				resizing=true,
				theme='advanced',
				loadbase='0',
				language='es',
				theme_advanced_buttons1 = "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,code,cleanup",
				theme_advanced_buttons2 = "",
				theme_advanced_buttons3 = ""
			)#
		</td>
	</tr>
</cfoutput>

Which renders as:

<tr>
		<td>

		<textarea name='en' id='en' style='width:444px; height:350px; visibility:hidden;'></textarea>

			<script type="text/javascript" src="/includes/js/tiny_mce/tiny_mce_gzip.js"></script>
			<script language="javascript" type="text/javascript">
				tinyMCE_GZ.init({
					plugins : 'autosave,spellchecker,style,layer,table,save,advhr,advimage,advlink,emotions,insertdatetime,preview,media,searchreplace,print,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
					themes : 'advanced',
					languages : 'en,es',
					disk_cache : true,
					debug : false,
					suffix : ''
				});
			</script>

		<script language="javascript" type="text/javascript">
			var configArrayen = [{
				mode : 'exact',
				element : "en",
				theme : 'advanced',
				plugins : 'autosave,spellchecker,style,layer,table,save,advhr,advimage,advlink,emotions,insertdatetime,preview,media,searchreplace,print,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
				theme_advanced_disable : 'hr',
				theme_advanced_buttons1 : "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,code,cleanup",
				theme_advanced_buttons2 : "",
				theme_advanced_buttons3 : "",
				content_css : '/static/css/main.css',
				theme_advanced_styles : "",
				paste_auto_cleanup_on_paste : true,
				paste_convert_pageheaders_to_strong : false,
				paste_strip_class_attributes : 'all',
				paste_remove_spans : false,
				paste_remove_styles : false,
				force_br_newlines : true,
				force_p_newlines : false,
				relative_urls : false,
				gecko_spellcheck : true,
				convert_urls : true,
				theme_advanced_resizing_use_cookie : true,
				theme_advanced_resizing : true,
				theme_advanced_resize_horizontal : false,
				theme_advanced_toolbar_location : 'top',
				theme_advanced_toolbar_align : 'left',
				theme_advanced_statusbar_location : 'bottom',
				extended_valid_elements : 'br,a[name|href|target|title|onclick|class],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]',
				language : 'en',
				forced_root_block : '',
				theme_advanced_toolbar_location : "bottom",
				theme_advanced_toolbar_align : "center",
				theme_advanced_statusbar_location : 'none',
				entity_encoding : "raw"
			}];
			Event.observe(window,'load', function(){
				tinyMCE.settings = configArrayen[0];
				tinyMCE.execCommand('mceAddControl', false, 'en');
			});
		</script>

		</td>
		<td>

		<textarea name='es' id='es' style='width:444px; height:350px; visibility:hidden;'></textarea>

		<script language="javascript" type="text/javascript">
			var configArrayes = [{
				mode : 'exact',
				element : "es",
				theme : 'advanced',
				plugins : 'autosave,spellchecker,style,layer,table,save,advhr,advimage,advlink,emotions,insertdatetime,preview,media,searchreplace,print,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
				theme_advanced_disable : 'hr',
				theme_advanced_buttons1 : "bold,italic,underline,|,formatselect,|,bullist,numlist,|,undo,redo,|,code,cleanup",
				theme_advanced_buttons2 : "",
				theme_advanced_buttons3 : "",
				content_css : '/static/css/main.css',
				theme_advanced_styles : "",
				paste_auto_cleanup_on_paste : true,
				paste_convert_pageheaders_to_strong : false,
				paste_strip_class_attributes : 'all',
				paste_remove_spans : false,
				paste_remove_styles : false,
				force_br_newlines : true,
				force_p_newlines : false,
				relative_urls : false,
				gecko_spellcheck : true,
				convert_urls : true,
				theme_advanced_resizing_use_cookie : true,
				theme_advanced_resizing : true,
				theme_advanced_resize_horizontal : false,
				theme_advanced_toolbar_location : 'top',
				theme_advanced_toolbar_align : 'left',
				theme_advanced_statusbar_location : 'bottom',
				extended_valid_elements : 'br,a[name|href|target|title|onclick|class],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]',
				language : 'es',
				forced_root_block : '',
				theme_advanced_toolbar_location : "bottom",
				theme_advanced_toolbar_align : "center",
				theme_advanced_statusbar_location : 'none',
				entity_encoding : "raw"
			}];
			Event.observe(window,'load', function(){
				tinyMCE.settings = configArrayes[0];
				tinyMCE.execCommand('mceAddControl', false, 'es');
			});
		</script>

		</td>
</tr>

There’s a lot of good stuff going on in there. Lazy loading, multiple instances per page, good defaults, language support, etc etc. Here is a sample including multilingual spellchecking:

tinymce_cfc

ColdFusion, TinyMCE ,

Poll for ColdFusion Developers: why FCKeditor?

February 24th, 2009

Last week I posted a poll asking CF developers which RTE they like to deploy and use themselves. Here are the results as of 2/24 midnight.

Deploy FCKeditor, use FCKeditor 13 (48.15%)

Deploy tinyMCE, use tinyMCE 12 (44.44%)

Deploy FCKeditor, use tinyMCE 2 (7.41% )

Delpoy tinyMCE, use FCKeditor 0 (0%)

Until today, FCK was more than a few votes ahead. I wondered why. And I found it odd that some deployed FCK but would rather use Tiny. So here is a new poll based on those results.

For those of you ColdFusion developers who prefer to deploy FCKeditor: why? Feel free to add more comments below.

ColdFusion, TinyMCE ,

Poll for ColdFusion Developers: tinyMCE vs FCKeditor

February 17th, 2009

I’ve come to learn that CF8 uses FCKeditor when using the RTE with CFTEXTAREA. But I have never liked FCKeditor. Maybe it’s the look. Maybe it’s the bugginess (in all fairness that was a long time ago). To me tinyMCE just seems a whole lot better. Recently I re-wrote the tinyMCE CF GZIP Compressor, soon to be their official cf compressor… so I am definitely on their side of the fence.

Like CF’s AJAX libraries, I don’t use the built in libraries. I prefer Scriptaculous, of which I am also a contributor. Again, that’s where my hands are.

So it makes me ponder what other CFers are doing. Using the built in RTE, or tinyMCE? Feel free to comment, too.

If all three readers of my blog would vote I’d really appreciate it =)

ColdFusion, TinyMCE , ,