You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I have developed a content editing (WYSIWYG) tool. There I need to lock certain part of the page so that such part becomes uneditable. The whole editor is an iframe. I enclosed the whole uneditable content in <span contenteditable=false></span> tag as well as <span unselectable=on></span> tag but both is not working perfectly. Can anybody help me?
You really should be using the DISABLED or READONLY attributes of the HTML Form controls within the IFRAME, as this is standard DHTML it should work for all browsers.
thanks for response. However my problem is not solved yet. READONLY applies only to form controls and DISABLED changes the style of text as well. So, I cant use any of them ... Can anybody provide better solution?
Thanks for response. Perhaps I failed to explain my problem. I want to have it like dreamweaver templates in which there are certain parts which cannot be edited. Only the area between and are editable. I want the same thing implemented in my content editor. Please help.