A Layout Editor for 2.0?

Re: A Layout Editor for 2.0?

by Nathanael Klassen -
Number of replies: 0

I did run into the issue with prototype.js messing up the HTML editor when I was adding the ability to drag blocks. Originally I had put the link to prototype.js and scriptaculous.js in the lib/javascript.php file where the other Javascript files are loaded. To solve the issue I only loaded prototype.js on the index.php page, which doesn't use the HTML editor and so didn't have the conflict.

Urs, I looked at the links you posted. In the comments someone had suggested a workaround for the issue the author was complaining about. I took a look at the htmleditor.php file, and it may not be too hard to patch it to work properly with prototype.js.

I haven't tested this extensively, but simply adding the following if block around lines 536-550 seemed to allow the HTML editor to load together with prototype.js:

if (group.propertyIsEnumerable(j)) { }

I haven't tested this with all the features of the editor, so please try it out and see if there are still other incompatibilities. I have attached the modified htmlarea.php. It's from 1.6dev, but I also compared it to the 1.5 version and the only difference was the version number in the comments.

Possibly prototype.js and Scriptaculous aren't the best long-term solution. I just used them because they allowed me to quickly add some features I wanted.

Nathanael