Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

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
 
Old March 14th, 2005, 06:58 AM
Registered User
 
Join Date: Nov 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Locking uneditable parts in WYSIWYG editor

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?


 
Old March 14th, 2005, 08:12 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

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.
 
Old March 17th, 2005, 05:57 AM
Registered User
 
Join Date: Nov 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

 
Old March 17th, 2005, 06:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

you could try and onfocus="blur()" type thing ?
 
Old March 18th, 2005, 03:34 AM
Registered User
 
Join Date: Nov 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old March 18th, 2005, 02:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

can you post some code so that we can have a look at it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a WYSIWYG editor furia_cross Javascript How-To 11 August 9th, 2006 01:57 AM
WYSIWYG editor including spell checker that... mat41 HTML Code Clinic 0 July 31st, 2005 07:00 PM
WYSIWYG editor question cutesneakers PHP How-To 5 January 2nd, 2005 12:27 AM
open and revert back tag in wysiwyg editor android66 Javascript 0 August 18th, 2004 02:00 AM
How to make an uneditable multiline textbox ltdanp21 VS.NET 2002/2003 2 June 16th, 2004 06:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.