Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: HTMLarea

  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HTMLarea

    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?

    TIA

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by nicora
    Where exactly could I find the code behind it?
    eh ... by looking at it directly!

    please note: the people behind HTMLArea have now discontinued the project!
    *keep it simple (TM)

  • #3
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:
    Code:
    <div contenteditable="true" oncontrolselect="if(event.srcElement.tagName == 'IMG') event.srcElement.onresizestart = function(){return false}"></div>
    Edit: Then again...
    simply putting this in the body somewhere would probably work too:
    Code:
    <script type="text/javascript">
    document.body.onresizestart = function()
    {
    	if(event.srcElement.tagName == "IMG")
    		event.returnValue = false;
    }
    </script>
    Last edited by codegoboom; 03-09-2005 at 08:51 AM. Reason: smiley abuse
    *this message will self destruct in n-seconds*

  • #4
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thx, i'll try that at work tomorrow!

  • #5
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

    http://meidevelopment.meierinc.com/editor/

  • #6
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just drop that code into the body, and it should work... if not, start over.
    Last edited by codegoboom; 03-09-2005 at 09:37 AM. Reason: out of time...
    *this message will self destruct in n-seconds*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •