The InnovaStudio WYSIWYG Editor is a very nice editor. It's not free but it's not expensive: $59.95 for an unlimited developer license.
Look here for more details: http://www.innovastudio.com/editor.asp

I'm implementing this editor for a number of clients; I have experience with FCKEditor and TinyMCE but I think this editor has a nicer interface.
There are some issues with CSS when you use the Garland theme in cases where Garland redefines td and th tags (adding borders and such). I tried to patch those with an extra CSS that unsets some of the defaults in system/defaults.css and garland/style.css. This may need some additional fine-tuning.

The people at InnovaStudio are very friendly and open to suggestions. However, their editor is not Open Source. I can not provide the editor itself with this patch; you will have to purchase it yourself.

Comments

dynamind’s picture

StatusFileSize
new60.69 KB
new55.1 KB

I've added two screenshots of my installation (Drupal 6.6 with Garland theme, Wysiwyg 6.x-0.5, InnovaStudio WYSIWYG 3.5)

sun’s picture

Thanks, I will investigate this further and also contacted InnovaStudio about this integration. We also need to make sure that this integration does not violate the GPL (I think it does not).

In general, please do not attach compressed archives. Either attach the files with an additional .txt extension, or learn how to create patches: http://drupal.org/patch/create

Why did you set the state to "code needs work"?

dynamind’s picture

Regarding the "code needs work" status - see the main description.
The editor runs fine but that's about all right now. There's no integration whatsoever apart from the mandatory "attach" function.

My priority is to get some sort of asset- and internal links browser working soon.

Regarding patches - I'll look into it. It's only new files though, and I'm not sure how to do that using the diff command. I'm more of a Subversion user anyway.

dynamind’s picture

StatusFileSize
new7.59 KB

Attached the patch file. Hope I did it correctly! I used the diff -urN [original folder] [modified folder] command

sun’s picture

Aside from the licensing issue that needs to be solved, here's some feedback on your patch:

- CSS file overrides too many styles. If at all required, Drupal.wysiwyg.editor.attach.innovastudio() has to add a surrounding DIV container for the editor that has a class name the CSS can build on. Most editors do this already though, so I do not think that this is needed.
- innovastudio.inc was written based on an outdated version of fckeditor.inc. I recommend to rewrite or update it based on the current version of nicedit.inc in CVS.
- wysiwyg_innovastudio_version() needs to properly detect the editor library's version.
- wysiwyg_innovastudio_settings() should build a proper settings array, which is passed to Drupal.wysiwyg.editor.attach.innovastudio() and 1:1 re-used there.
- Please remove wysiwyg_innovastudio_plugin_settings() and wysiwyg_innovastudio_plugins() (and also their callback definitions in wysiwyg_innovastudio_editor()).
- Drupal.wysiwyg.editor.init.innovastudio() is not required. Please remove.
- Drupal.wysiwyg.editor.attach.innovastudio() should just pass the settings variable to initialize a new instance of the editor. Everytime this function is called, a new instance is created. So you also have to remove the creation of the DIV element.
- Drupal.wysiwyg.editor.detach.innovastudio() needs to detach, resp. remove/destroy, one editor instance or all instances, depending on whether params are passed to the function. Have a look at the other integration scripts to find out how this needs to work.

Lastly, we use two spaces instead of tabs. Please configure your editor accordingly.

dynamind’s picture

StatusFileSize
new6.88 KB

Thanks for your feedback. By the way, the patch I provided above was little more than a rough hack. I've cleaned up parts of the code, following your suggestions above - except for rewriting the inc according to the nicedit.inc example. I'll get to that later.

The CSS tag redefinitions (table, td, th) were actually no longer needed. I should have removed them.

There is an issue with the attach; due to some eval() constructions used by the editor, the variable pointing at the instance should be globally accessible. They (InnovaStudio) expect you construct the editor like this:

<textarea id="blurb"></textarea>
<script type="text/javascript">
  var oEdit1 = new InnovaEditor("oEdit1");
  oEdit1.REPLACE("blurb");
</script>

For now I've skipped the issue by defining it as above, but it effectively limits the number of active editors to 1. I'm trying to find a way around it.

sun’s picture

That's simple. Just use this in the attach function instead:

  var instance = new InnovaEditor(params.field);
  instance.REPLACE(params.field);

Also, that's why I suggested to have a look at the other integration scripts.

dynamind’s picture

I am aware of the proper technique, but perhaps I was not clear in my explanation.
I'll show you with code what my understanding is on this matter.

First of all I don't think I "get" your example completely at this point, so please forgive me if the following is nonsense;

The technique commonly used by InnovaStudio to get a reference to the InnovaEditor object is this:

innovastudio/scripts/editor.js

  ...
  var obj=eval(this.oName);
  ...

The this.oName variable is the name provided during the instantiation of the object, i.e:

  var myInstance = new InnovaEditor("myInstance"); // parameter needs to match variable name

Thus, the code to get the instance used by InnovaStudio in this case is:

  var obj=eval("myInstance");

This will fail if the variable "myInstance" is not globally accessible.

Actually replacing a textarea is the next step by calling the myInstance.REPLACE(id) function.

sun’s picture

Eval is evil. Someone should teach those developers how to code.

Anyway, thanks for analyzing this and clarifying - simple solution - use this in the attach function instead:

  window[params.field] = new InnovaEditor(params.field);
  window[params.field].REPLACE(params.field);

This declares the variable in the global scope (of the current window), so eval() should return its value.

See also https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Variables#Glo...

dynamind’s picture

Yes, I agree ;-)

Thanks for the suggested fix. I'll give it a try!

dynamind’s picture

This made it work:

  var paramsField = params.field.replace('-','_'); // Hyphen is invalid character in variable name
  window[paramsField] = new InnovaEditor(paramsField);
  window[paramsField].REPLACE(params.field, dvId);
sun’s picture

What's the status of this patch? Can you re-roll with the latest changes?

sun’s picture

Title: InnovaStudio WYSIWYG Editor support (v3.5) » Add editor: InnovaStudio
Version: 6.x-0.5 » 6.x-2.x-dev
tchopshop’s picture

is innovastudio supported for drupal 7?

twod’s picture

No, it is not. No new editor implementations have been added since D6.