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 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2004
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DesignMode vs Contenteditable on DIV

    Hi,

    I created a (basic) WYSIWYG editor in javascript. Problem is that I used a DIV and contenteditable true.

    So It won't work in other browsers except IE.

    I readed that I need to set DesignMode to on to get the same result. Problem is all I find about designmode is on iframes not on divs. If I try it on a div it will fail.

    How can I make a div editable for other browsers?

    Tanks in advance

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    generate the interface using JS. use object detection to determine which method is supported, then create the corresponding element accordingly:


    Quote Originally Posted by pseudo_code
    if designMode ... insert iframe
    else .... insert div
    *keep it simple (TM)


  •  

    Posting Permissions

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