View Full Version : HTMLarea

03-09-2005, 01:26 AM
This is a question for those of you familiar with HTMLarea (http://www.dynarch.com/projects/htmlarea/).

Is it possible to disable the image resize functionality? Where exactly could I find the code behind it?


03-09-2005, 02:27 AM
Where exactly could I find the code behind it?

eh ... by looking at it directly! :rolleyes:

please note: the people behind HTMLArea have now discontinued the project!

03-09-2005, 02:43 AM
Basically, you'd have to cancel the onresizestart event for each image... how exactly to go about that, I couldn't tell you--without seeing how your source is generated, but here's a sketchy example from a container (or "area") level:

<div contenteditable="true" oncontrolselect="if(event.srcElement.tagName == 'IMG') event.srcElement.onresizestart = function(){return false}"></div>

Then again...

simply putting this in the body somewhere would probably work too:

<script type="text/javascript">
document.body.onresizestart = function()
if(event.srcElement.tagName == "IMG")
event.returnValue = false;

03-09-2005, 07:23 AM
thx, i'll try that at work tomorrow!

03-09-2005, 07:36 AM
no joy on that, here is the link to the page. Basically this is a watered down version of HTMLArea. I am removing some of the functionality, then adding a series of custom buttons.


03-09-2005, 09:27 AM
Just drop that code into the body, and it should work... if not, start over.