Results 1 to 6 of 6

Thread: Need a better html editor why not FCKeditor?

  1. #1
    kpit's Avatar
    kpit is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Dec 2005
    Location
    Memphis, TN
    Posts
    996

    Lightbulb Need a better html editor why not FCKeditor?

    I have noticed several limitations of the currently used html editor. First and most importantly is problems with Browsers issues ( IE ). Spell checker, there is none. The ablility to create an HTML form in an email message. I have found that the FCKeditor ( http://www.fckeditor.net/ ) to be a much better class of editor for several reasons.

    1. Multiple Language Support
    2. Spell Checker
    3. FCKeditor is compatible with most internet browsers which include: IE 5.5+ (Windows), Firefox 1.0+, Mozilla 1.3+ and Netscape 7+.
    4. On the server side, FCKeditor offers a complete integration pack for PHP and other languages.
    5. Skinnable theme capability
    6. LGPL License


    Any other suggestions or coments on this?

  2. #2
    bitman is offline Member
    Join Date
    Nov 2005
    Posts
    5

    Default Re: Need a better html editor why not FCKeditor?

    I use TinyMCE with Sugar and am quite happy with it. It's much less buggy than HTMLArea and looks better too. But the most important feature is that it produces sensible HTML code, which neither HTMLArea nor FCKeditor do to my satisfaction.

    If you look in the source code (for 3.5 anyway), you'll see that there is already code for using FCKeditor, if it cannot find HTMLArea. So the decicion to use HTMLArea over FCKeditor was a conscious one.

  3. #3
    krokogras is offline Sugar Community Member
    Join Date
    Aug 2005
    Posts
    86

    Default Re: Need a better html editor why not FCKeditor?

    could you please show us, how you did include the tinymce editor?
    in my opinion tiny_mce is one of the most stable html editors and i would prefer tinymce too.
    with the php_connector enabled it is also the most fast editor available at moment.

  4. #4
    eden is offline Sugar Community Member
    Join Date
    Oct 2005
    Posts
    23

    Default Re: Need a better html editor why not FCKeditor?

    Yes, I would be interested in how you switched to tinyMCE in sugar as well.

    Thanks

  5. #5
    alsutton is offline Sugar Community Member
    Join Date
    Aug 2005
    Posts
    127

    Default Re: Need a better html editor why not FCKeditor?

    I've put a poll up in the thread at http://www.sugarcrm.com/forums/showthread.php?t=9190, hopefully it will show the strength of feeling behind a change.

    Al.

    P.S. I'd also like to see some tinyMCE instructions if anyone has a pointer to them.
    Al Sutton
    Argosy TelCrest
    www.argosytelcrest.com

  6. #6
    bitman is offline Member
    Join Date
    Nov 2005
    Posts
    5

    Default Brief guide to setting up TinyMCE with sugar

    I don't have a patch for setting up TinyMCE, but I'll point you in the right direction.

    1. Download tinymce and extract it to sugarcrm's include directory (it should create a tinymce directory there)
    2. Create a file named email_body.html in sugar\include\tinymce that contains:

      Code:
      <script language="javascript" type="text/javascript" src="include/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
      <script language="javascript" type="text/javascript">
      	tinyMCE.init({
      		mode : "exact",
      		elements : "email_body_html",
      		content_css: "include/tinymce/style.css",
      		theme : "advanced",
      		plugins : "paste,contextmenu",
      		theme_advanced_toolbar_location : "top",
      		theme_advanced_statusbar_location : "bottom",
      		theme_advanced_disable : "anchor,image",
      		theme_advanced_buttons2_add : "removeformat,charmap,separator,cut,copy,paste,pastetext,pasteword",
      		theme_advanced_buttons3 : ""
      	});
      </script>
      Read tinymce's documentation for tips on customizing the TinyMCE interface. I think this configuration works pretty well for sending emails, but you may want to add or remove other features as well. If you want to use the tinyMCE compressor, you will need to edit this file.
    3. Open the file modules\Emails\EditView.html and find the line:
      Code:
      <div id="html_div"><textarea tabindex='4' name='description_html' cols="100" rows="20">{DESCRIPTION_HTML}</textarea></div>
      Replace it with:
      Code:
      <div id="html_div"><textarea tabindex='4' name='description_html' cols="120" rows="30" id='email_body_html'>{DESCRIPTION_HTML}</textarea></div>
      This adds the 'email_body_html' id to the text area so that TinyMCE can find it.
    4. Open modules\Emails\EditView.js and find the line:
      Code:
      function appendEmailTemplateJSON() {
      Replace this with:
      Code:
      function appendEmailTemplateJSON() {
      	if (tinyMCE) {
      		document.EditView.name.value = decodeURI(json_objects['email_template_object']['fields']['subject']);
      		document.EditView.description.value = decodeURI(json_objects['email_template_object']['fields']['body']).replace(/<BR>/ig, '\n');
      		tinyMCE.setContent(decodeURI(encodeURI(json_objects['email_template_object']['fields']['body_html'])));
      		return;
      	}
      This allows you to select a template when sending email with TinyMCE.
    5. Open modules\Emails\EditView.php and find the line:
      Code:
      if ( file_exists('include/htmlarea/htmlarea.js')) {
      Replace it with:
      Code:
      include "include/tinymce/email_body.html";
      if (false) {
      This disables FCKeditor and puts TinyMCE in its place.


    That should set it up to send email with tinyMCE. You may also want to make similar changes to EditView.html, EditView.php, and PopupEditView.php in modules\EmailTemplates to use TinyMCE when editing email templates.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •