Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Iron Speed
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old May 15th, 2002, 09:00 PM
dgibson dgibson is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Urbana, MD, USA
Posts: 66 dgibson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
WYSIWYG in an inline DIV

OK, I've been playing with all sorts of MSHTML since reading your article and I was wondering what the best way is to show an entire document in edit-mode (unframed, no scroll like the Ilayer has by default). I've tried this in an inline div, and it seems pretty nice, but a few things need tweaking for their DOM references to work again. The advantage I found also is that I can use the onPaste event and filter (via functions) pasted text to get out some of that Word garbage code before allowing the paste to occur. I can't seem to get the event to work at all on the ILAYER.

Any help on either getting this to work or the ILAYER to stretch to the length of the document like the DIV does? Any other cool ideas to share with regards to the WYSIWYG editor?

Reply With Quote
  #2  
Old May 15th, 2002, 10:43 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
hmm, when using a iframe theirs some JS code that you sometimes have to use, but i cant remember it lol, its something like
document.body.iFame_name

something like that, is that what your trying???

hope it helps

Reply With Quote
  #3  
Old May 16th, 2002, 06:17 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
hey,
i mainly work with MSHTML and iFrames, because i find them easier, but doesnt an ilayer have style.width, so you could use:

iLayer.style.width = '100%';

assuming that it's in a container that is as wide as the area you want it to fill...

Reply With Quote
  #4  
Old May 16th, 2002, 08:48 PM
dgibson dgibson is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Urbana, MD, USA
Posts: 66 dgibson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Yeah, I've got the width right, but I want the LENGTH to be 100% of the document. This is how it works with a DIV with overflow: none; It lets you preview the content a lot easier, but of course does not work as well for really long docs. I am making my editor a CF custom tag, so I planned to omplement both an inline (div) and embedded (ilayer) field as an attribute in calling the custom tag.

If I could somehow get the ILAYER to expand with my document and also recognize an onPaste event, there would be no need for the DIV version, as it causes a few other problems itself.

Reply With Quote
  #5  
Old May 17th, 2002, 10:02 PM
dgibson dgibson is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Urbana, MD, USA
Posts: 66 dgibson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Aha! I've scrapped the inline DIV now that I wrote a function to expand my IFRAME to the length of the document. I simply init the function in the main WYSIWYG init(). Then I added a window-title bar atop the editor with expand and restore functions that calls a resize function. In expanded mode, I set a setInterval that sets the Iframe height equal to the content scrollHeight like so:

document.all.#ATTRIBUTES.EDITPANE#.style.height=#A TTRIBUTES.EDITPANE#.document.body.scrollHeight+50;

Obviously if you're not using Cold Fusion, you need to sub out the variable in #'s with a proper object reference.

In case you're still wondering, the whole point of this exercise was to allow for the entire content to be viewable without a limited size IFRAME that requires scrolling. The toggle made it easier to handle with long content tho, as well.

Now if only I could get the onPaste event to fire in an IFRAME...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > WYSIWYG in an inline DIV


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway