Print Page | Close Window

Disabling the editor

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=16070
Printed Date: 29 March 2026 at 12:33pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Disabling the editor
Posted By: abarker
Subject: Disabling the editor
Date Posted: 03 August 2005 at 11:43am
I want to do to RTE something similar to what happens to an html input element when it's disabled attribute is set - you know, the input area gets greyed-out and you can't edit the text. 
 
I want to disable the editor this way so I can prevent user input until a certain action is done and then re-enable it.  Does anybody know how to do this?
 
Thanks



Replies:
Posted By: old_techhead
Date Posted: 03 August 2005 at 1:57pm
I would think the simplest way would be to have some code in the page that had pseudocode similar to:
 
if permission_not_allowed
    display RTE_text in table cell (no textarea)
else
    display RTE_text in textarea (in table cell)
end if
 
then when permission_is_granted just go through the pseudocode again.
 
Hope that helps. The secret here is to not display the code inside a textarea until you want to be able to edit it.


-------------
Please will someone bring back punch cards...


Posted By: abarker
Date Posted: 03 August 2005 at 2:11pm

Thanks for your reply.  I could elminate the RTE textarea at times when I don't want it to be edited, but then the editor would disappear.  I want it to appear to the user as if the editor is there, but not able to be edited.



Posted By: old_techhead
Date Posted: 03 August 2005 at 2:48pm
Ok... try the tips in this article. This should do what you want...
 
http://www.faqts.com/knowledge_base/view.phtml/aid/868/fid/130 - http://www.faqts.com/knowledge_base/view.phtml/aid/868/fid/130


-------------
Please will someone bring back punch cards...


Posted By: abarker
Date Posted: 03 August 2005 at 3:15pm

Thanks again for the reply.  The problem with this approach is that the textarea element that is used by RTE for some reason isn't affected by the disabled attribute.  I tried it.  For example, the following code normally gives me a disabled textarea:

<textarea name="mytext" cols="70" rows="15" id="mytext" disabled="disabled"></textarea>
 
However, when I add the rest of the html/asp code to the page to have RTE use this textarea, the textarea will no longer be disabled.  I'm not sure how RTE does it, but it effectively invalidates the disabled property for this textarea.
 
I think it'd be great if Web Wiz just included the 'disable' property as a special property that could be turned on and off on the fly since disabling its textarea doesn't do the trick.


Posted By: dpyers
Date Posted: 04 August 2005 at 2:24am
Can't you just put it in a div and use javascript/dhtml to toggle the display off/on?

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: abarker
Date Posted: 04 August 2005 at 8:14am
Yes, that would be a fine solution and I almost did that.  But what I really want, for the user's sake, is a way for the wywiwyg editor to be visible but just 'greyed out', like disabled text areas.
 
Thanks for the suggestion though.


Posted By: dpyers
Date Posted: 04 August 2005 at 12:27pm
It's a little hoky, but you could put it in a div and use z-order to put that div behind another of the same size that has an opaque .gif in it.
As long as the div with the opaque .gif is on top and/or displayed it'll intercept anything the user clicks while "dimming" the form.
You can use java script to either toggle the z-order or the display.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: abarker
Date Posted: 04 August 2005 at 3:58pm

That's an excellent suggestion.  I think I'll try it.  Thanks a lot.

Do you know of a good resource of information about z-order?  I'll Google it, but to be honest, I've never done anything with divs & z-order.
 
-Andrew


Posted By: dpyers
Date Posted: 04 August 2005 at 4:53pm
z-order is a css positioning thing <div style="z-order:2;">  goes in front of <div style="z-order:1;">  if both divs use absolute positioning to overlap each other. Couple of examples of something similar here - http://www.new2asp.com/Section_CSS/default.asp - http://www.new2asp.com/Section_CSS/default.asp

You'd need to reload the page though when you toggle. With javascript/dhtml toggling visibiliity/display, you wouldn't rload.



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: abarker
Date Posted: 04 August 2005 at 5:08pm
Thanks for your reply.  I'm also having quite a bit of trouble finding/generating an opaque image.  Do you know of any good resources / image editors I might try?


Posted By: dpyers
Date Posted: 04 August 2005 at 7:12pm
I think Paint Shop Pro has a free trial you can download.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Kocken
Date Posted: 05 August 2005 at 6:29am
Hi
 
Or you could use a filter on the layer.
 
<DIV ID="Genomskinligt" STYLE="position:absolute; top:157px; left:25px; width:801; height:800px; z-index:2
padding:10px; background:silver;
filter:
 progid:DXImageTransform.Microsoft.BasicImage(grayscale=0, xray=0, mirror=0, invert=0, opacity=0.50, rotation=0)
 progid:DXImageTransform.Microsoft.Shadow(color='#666666', Direction=135, Strength=16)">
</DIV>
 
Dosent work in all browsers.
 
Here is an ex. http://www.kocken.com - http://www.kocken.com   with opac and a shadow.
Its in swedish, but i think you get the hang of it.
 
Björn


-------------
Regards. Björn


Posted By: dpyers
Date Posted: 05 August 2005 at 10:27am
Actually, filters only work in 1 browser - lol.
Catering to the IE crowd is increasingly a loosing proposition.
http://www.w3schools.com/browsers/browsers_stats.asp - http://www.w3schools.com/browsers/browsers_stats.asp


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: abarker
Date Posted: 08 August 2005 at 9:01am
So it seems like an opaque image is the way to go.  The only problem is that I'm having the hardest time generating an opaque image.  I found an image online that was the right color, but not the right size. But when I try to edit the image, no matter what I do - stretch, copy & paste sections, etc., the image editor saves the image as solid instead of opaque.  I'm using Corel/JASC Paint Shop Pro, and I even try to adjust the opacity of the layer, and it still saves as solid.   Is there something about opacity that I'm missing here?
 
Thanks


Posted By: dpyers
Date Posted: 08 August 2005 at 1:44pm
Actually, you don't need to have the opaque image be the actual size of the rte. You just need it to be the background of a DIV on top of the RTE. The DIV need to be the size of the RTE.

Something similar - but in reverse - to what's here... http://www.new2asp.com/Section_CSS/Img_O_U_Text/translucent_text_area.asp - http://www.new2asp.com/Section_CSS/Img_O_U_Text/translucent_text_area.asp
If you are having trouble setting it up, PM me with a url.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: abarker
Date Posted: 08 August 2005 at 3:43pm
Oh yeah.  Now I feel sort of silly.  Thanks a lot, though.


Posted By: dpyers
Date Posted: 08 August 2005 at 6:23pm
Originally posted by abarker abarker wrote:

Now I feel sort of silly.

Been There... Done That... Got ash*tload of teeshirts - LOL


-------------

Lead me not into temptation... I know the short cut, follow me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net