CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Integrating TinyMCE in CiviCRM
Pages: [1]

Author Topic: Integrating TinyMCE in CiviCRM  (Read 5526 times)

pharrukh

  • Guest
Integrating TinyMCE in CiviCRM
November 28, 2007, 05:04:20 am
Hi Frendz ..

i have installed TinyMCE in Drupal, but facing problems in integrating it with CiviCRM. Could anyone please guide me how to integrated TinyMCE in CiviCRM ?

Regards,

pharrukh.

pharrukh

  • Guest
Re: Integrating TinyMCE in CiviCRM
December 10, 2007, 02:20:42 am
well, a lot of people are visiting this topic, but it seems that the task is not that much easy :(

Currently i just want to share a little experience.

As i said that i had installed TinyMCE in Drupal, but was unable to use it in CiviCRM. So i have used TinyMCE in CiviCRM using a somehow manual way. I have made a little change in the code of JavaScript that we use to include the TinyMCE in our web-page.

I changed the mode : "textareas" to mode : "exact". Doing this we restrict TinyMCE to only our desired textareas instead of all textareas on the page.
Just a little more change in the JavaScript Code is, to add another parameter elements after the parameter of mode. In the parameter of elements we include the names/ids of our desired textareas.

Now, after change, that JavaScript code looks like this,

<script language="javascript" type="text/javascript">
tinyMCE.init({
   //mode : "textareas",
   mode : "exact",
   elements : "body_html",
   theme : "simple"
   });
</script>



thanks,
pharrukh.
« Last Edit: December 10, 2007, 02:39:23 am by pharrukh »

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Integrating TinyMCE in CiviCRM
December 18, 2007, 03:56:00 pm
I seem to have a heck of a time operationally using the HTML editor with CiviMail - I'm not sure if the issue is with the editor or how the javascript interacts with it.  For editors, I've really enjoyed working with:
Whizzywig: http://unverse.net/

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Integrating TinyMCE in CiviCRM
December 18, 2007, 08:15:32 pm
CiviMail uses Dojo Editor widget.

kurund
Found this reply helpful? Support CiviCRM

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Integrating TinyMCE in CiviCRM
December 20, 2007, 08:44:27 pm
Sounds like it should not be a big deal to switch editors, if have another favorite.  Where would we find the code for the CiviMail Form?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Integrating TinyMCE in CiviCRM
December 20, 2007, 09:09:42 pm
Sure can you submit a patch for the same. Check CRM/Mailing/Form/Upload.php

kurund
Found this reply helpful? Support CiviCRM

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Integrating TinyMCE in CiviCRM
January 13, 2008, 08:07:43 pm
Just reporting that we're revisiting the JavaScript editor issue.  A user today could not display the HTML text from reused mailings - not sure why works for me (but hard to use) and other screens work fine for the user.  I temporarily did their mailing.  Don't get me wrong, I'm a strong CiviMail fan, but I'd describe the JavaScript editor interaction in CiviMail as masochistic even for me.    I use JavaScript editors for all of my clients and the user in question interacts fine with other javascript editors in other applications.

If others are modifying the editor code, please let me know and I'll report back if I think I have an improvement that works on the CiviMail screen.

Actually found some of the code - this is pretty much a first:
Line 160 through 172 must be part of the puzzle.  One item that may be immediately useful is the textarea height setting (we will increase) Not sure how to switch editors, but will study.
« Last Edit: January 13, 2008, 08:36:07 pm by Denver Dave »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Integrating TinyMCE in CiviCRM

This forum was archived on 2017-11-26.