OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



TinyMCE problem: could not use the Toggle editor with JavaSc

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

TinyMCE problem: could not use the Toggle editor with JavaSc

Postby tky » Wed Oct 17, 2007 6:21 am

Hi, OJS team, it's TKY again:

I install the tinymce editor 2.1.2 in plugins, and it's working well.
But I don't wanna to use the editor all the time, especially in sending emails: the body of email would include some additional html labels which I don't want.

I went the tinymce wiki page, and copy the Toggle editor with JavaScript codes,
Code: Select all
function toggleEditor(id) {
   var elm = document.getElementById(id);

   if (tinyMCE.getInstanceById(id) == null)
      tinyMCE.execCommand('mceAddControl', false, id);
   else
      tinyMCE.execCommand('mceRemoveControl', false, id);
}
   

I paste them in the TinyMCEPlugin.inc.php, blow the tinyMCE.init({...});.
And the terrible thing happened: the whole site got into the white page, nothing on there.

I guess the OJS didn't support the function, right?
But I thought it's a really important function for switch the different input ways easily.

Is any way make OJS work with this Toggle editor function?

thanks

TKY
tky
 
Posts: 12
Joined: Wed Aug 29, 2007 2:58 am

Re: TinyMCE problem: could not use the Toggle editor with JavaSc

Postby asmecher » Wed Oct 17, 2007 10:37 am

Hi TKY,

I don't have any experience with the Toggle editor; however, one of the things that we've improved for the next release, which is due shortly, is specific enables and disables for the various form fields in OJS. This means that TinyMCE will only be enabled for the specific form fields that support HTML.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9212
Joined: Wed Aug 10, 2005 12:56 pm

Re: TinyMCE problem: could not use the Toggle editor with JavaSc

Postby tky » Thu Oct 18, 2007 6:39 am

Hi, Alec:

Thank you for your reply.
But I don't think that's a good idea to limite the areas enable tinymce.
I believe a good html editor like tinymce is a very important helper for old-fashion users and editor.
A better way to support tinymce, I think, is to support it's toggle function. Make it just like a light switcher, let users to decide when and where turn on or turn off it.

I mean, if you support tinymce already and so far so good, why improve this support?

TKY
tky
 
Posts: 12
Joined: Wed Aug 29, 2007 2:58 am

Re: TinyMCE problem: could not use the Toggle editor with JavaSc

Postby asmecher » Thu Oct 18, 2007 9:29 am

Hi TKY,

The problem is that there are many fields that shouldn't support HTML, such as email bodies (since emails are sent out plain-text for best compatibility), email signature fields, and a handful of other minor exceptions. Rather than simply blanket-enabling TinyMCE for all text fields, we've refined support so that it's only specifically enabled for fields that do support HTML. TinyMCE has been a great addition to OJS and we'll definitely continue to support it and improve its interaction with OJS; for example, it'll be included and enabled by default in OJS 2.2 and later.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9212
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests