Please take a look at this:
http://code.gogo.co.nz/products/htmlarea_fork.html

I would like to hear your opinions and if it should be added as an alternative drupal module.

Also, what about FCKEditor? That is looking promising. Any interest?

Thank You.

sull

CommentFileSizeAuthor
#17 htmlarea_0.module33.94 KBgordon
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

I liked both the options you sent. The htmlarea fork might be really easy to add in for the time being. If he is maintaining it that's more than the htmlarea at htmlarea.com. I would vote for it.

gordon’s picture

The Fork of HTMLArea can be just used as a drop in replacement, you can actually just unpack the code unto the htmlarea module directory and htmlarea will use that version instead of the one that comes with htmlarea. You may have to check the plugins to make sure that they are initilised correctly, and doesn't try to start any plugins that are not there.

FCKeditor looks preety good, I haven't had a really good chance to play with it, but you could just fork the htmlarea module and change it to start FCKeditor instead. What would be much better would be to start a make the htmlarea have a turn key type function to allow the same configuration work on both htmlarea and FCKeditor.

Boris Mann’s picture

I believe that FCKeditor's plugin architecture is not as good.

The "fork" mentioned looks good (lots of bugfixes) but I don't think it would be an alternative. From the description, if you were to drop that code in place instead of the "official" HTMLArea (in misc/), then everything should still work.

Give it a try, see what happens.

gordon’s picture

The htmlarea looks for htmlarea.js in 3 places and runs the first one it finds.

  1. misc/htmlarea
  2. {htmlarea module dir}/htmlarea
  3. {htmlarea module dir}/HTMLArea-CVS

So if you unpack the archive into the {htmlarea module dir} it will run instead of the default one.

Max Bell’s picture

Sull --

I have to voice my support of this idea, too. HTML area is probably the single-most important module in my installation. Without it, I would STILL have people asking me how to create links.

If you really wanted to take this to the next level, though? Drupal has needed a theme-creation module since forever. I think I saw it in a to-do list somewhere, two years or so ago, and nobody's touched it to date (or I would have installed and used it -- remember Polder? =) -- I'm not claiming to know what I'm talking about and I'm sure this is hereasy to the folks who like their textarea plain vanilla, but PHPTemplate and a couple of style sheets and...

I'm gonna learn to code RSN. As soon as I fix my style sheets for 4.5.1...

sulleleven’s picture

Gordon,
Before I posted, I did do as you suggest, and the new htmlarea fork appeared, but the menu appeared doubled and the container width was all screwey. I only took a minute to do this...
I will try again and maybe make sure it is only called once and see whats up with the container size issue.

anyone else try this yet?

sull

sulleleven’s picture

update... after swapping the htmlarea with the fork, and after going into htmlarea admin settings and making a few changes/saving, it now appears correctly. i'll see how things work now. promising though.

sull

judah’s picture

sulleven,

if you have done it successfully would you just modify the steps i listed here. something like,

1. download from ...
2. upzip and copy htmlarea.js into modules/htmlarea
3. goto /admin/settings/htmlarea/ and resave all pages

i'll verify it.

sulleleven’s picture

I uploaded the entire folder of this forked htmlarea inside the htmlarea module dir as so:

/modules/htmlarea/htmlarea

rename the original HTMLArea-CVS to something else other than htmlarea and HTMLArea-CVS or just remove it

copy over any plugins you were using.

Go to admin/settings/htmlarea and activate some plugins and toolbars and save the config.

see if it works for you. that last step may only need to be going in and saving config without changing of settings.

So, i have not yet tried the new plugin format and the ones included that are to be located on the left side of container do not appear. It will need some massaging I guess, but the basics work as do any existing plugins. Much faster, and fixes annoying bugs.

judah’s picture

i did the above steps and i get that doubled htmlarea effect you mentioned.

i've copied the folder contents into
/modules/htmlarea/htmlarea
and renamed the original HTMLArea-CVS to "HTMLBack".
I also went into settings > htmlarea and reset and saved the configuration on all tabs.

judah’s picture

Just to be sure, i went in and turned on the "Full Screen" plugin like you did and now the doubled up effect is gone. I unchecked it and the doubled up effect came back.

I think it was Sherlock Holmes that said when you have excluded the impossible, whatever remains, however improbable, must be the truth.

judah’s picture

Note: It seems linebreaks in the toolbar do not work.

gordon’s picture

I have done some testing in with this version and it seems to be alot more stable that the main version. I have also had to make an addition that I have added to the htmlarea module so that linebreaks will be included in the toolbar.

I have commited this to cvs so you will be able to download now.

sulleleven’s picture

thanks gordon.
what do you think about the additional plugin system where some can be located to the right of container?

sulleleven’s picture

gordon,
I am using drupal cvs, and after upgrading the htmlarea.module, I get this error when on the 'add' pages:

Fatal error: Call to undefined function: drupal_get_path() in /my/path/modules/htmlarea/htmlarea.module on line 509

sulleleven’s picture

should module_get_path replace drupal_get_path ?

gordon’s picture

FileSize
33.94 KB

You need to be running drupal cvs to be use the cvs version of htmlarea. I have backported this patch to 4.5 but I am not commiting it yet. I need some people to test it before I will do so.

Attached is the revised version of the 4.5 htmlarea.

judah’s picture

I am testing the module you just posted. A couple things I noticed.

- Linebreaks in the toobar do work.

- HTMLArea dissappears on inconsistently. I went to edit a post and it was visible. When I hit the preview button the htmlarea dissappears on the next page. The page was /node/1/edit. I looked in the settings > htmlarea > textareas page and didn't the path listed. Default for New Textareas is on.

- The size dropdown doesn't syncronize with the htmlarea. I selected a paragraph and set the size to 14pt. The size dropdown automatically selected 36pt item for some reason. The paragraph text displayed 14pt. I reselected 12pt and the text became 12pt again. The size dropdown still showed 36pt option selected. But the text in the htmlarea was back to it's original size. When I hit the preview button the paragraph of text was larger than the htmlarea. It looked like it was 14pt.

- Linebreaks in the code "\n" show in the post unless you set the filter to PHP code. Using Filtered HTML or Full Html still insert linebreaks into the html. Full Html really isn't full html.

- Had a couple issues with the undo button. When selecting text and applying a header format to the text then I added some more text in a paragraph after it. Then I hit undo and it inserted <<< and >>> around the text. I can't reproduce it but I saw it another time too.

- Bold button won't unbold sometimes. Goto create page. Type in some text. Select it. Press bold button. Goto the end of the line and press enter. Start typing. The text is still bold. Normal behavior so far. Now select the second line of text and try to unbold it. It won't unbold it. On testing it some more it italics also seems to do the same thing. This may be something to do with htmlarea's select region functions rather than the buttons.

I didn't use the htmlarea from 4.5 very much so I don't know if any of these issues are all from the htmlarea fork or the new module or 4.5.

gordon’s picture

Anonymous’s picture