User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 391,971 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,157 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

textarea with formatting

Join Date: Mar 2007
Location: georgia
Posts: 55
Reputation: hunkychop is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 4
hunkychop's Avatar
hunkychop hunkychop is offline Offline
Junior Poster in Training

Re: textarea with formatting

  #3  
Mar 12th, 2008
i am aware that i need to use wysiwyg techniques, but all of the sources i have found online come preset with font drop downs, change text size, insert hyperlink etc. i just want the script i wrote to color the text to help the user visably when they are modifiing the content of the textarea (midi xml and text).
it definitely needs to be cross-browser compatible

the end result of the script will be something like editing scripts in dreamweaver (functions are a different text color that regular text, etc.)

so... could i change the textarea to a scrolling div and run this in my javascript?
<script type="javascript">
function writeEditor(){
var textdiv = document.getElementById('textdiv');
textdiv.designMode = 'On';
//call function that fills in preset txt here textdiv.innerHTML="preset txt or txt from db";
} function getTxt(){
var textdiv = document.getElementById('textdiv');
document.write(textdiv.innerHTML);
} </script>
toast
Reply With Quote  
All times are GMT -4. The time now is 9:21 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC