Current location: Hot Scripts Forums » General Web Coding » JavaScript » WYSIWYG Editors


WYSIWYG Editors

Reply
  #1 (permalink)  
Old 03-07-06, 05:04 PM
Barnz1986 Barnz1986 is offline
Aspiring Coder
 
Join Date: Jan 2006
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
WYSIWYG Editors

Does anyone know how people make the text boxes for WYSIWYG editors?

I imagine its not your standard <textarea> tag, but if it is not what is it?

I understand how to change the HTML of a document. But I dont understand how the WYSIWYG editor is like a normal <div> </div> area etc, but it still allows the user to enter text?

Anyone have any knowledge on this?

Its like I could build it if I used the <textarea> for user input and the <div></div> area for the display.

But I dont understand how these things are like combined into a single textarea?
Reply With Quote
  #2 (permalink)  
Old 03-07-06, 05:18 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Try the FCK editor (http://www.fckeditor.net/) or HTMLArea (http://www.htmlarea.com/).
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
  #3 (permalink)  
Old 03-07-06, 05:27 PM
Barnz1986 Barnz1986 is offline
Aspiring Coder
 
Join Date: Jan 2006
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by End User
Try the FCK editor (http://www.fckeditor.net/) or HTMLArea (http://www.htmlarea.com/).
Yeah I have seen HTMLArea but I want to code my own.
Reply With Quote
  #4 (permalink)  
Old 03-07-06, 06:52 PM
Newb-Man's Avatar
Newb-Man Newb-Man is offline
Newbie Coder
 
Join Date: Mar 2006
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
can't say that makes much sense. Do you mean you want to make one???
__________________
Why not check out my website
EXPIRINGLINKS.CO
EXPIRINGLINKS.CO

It's allows you to make secure, encrypted links that expire when tell them to (or not at all if you wish). The best thing for posting links on forums.
Reply With Quote
  #5 (permalink)  
Old 03-07-06, 08:31 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by Barnz1986
Yeah I have seen HTMLArea but I want to code my own.
Then do it.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
  #6 (permalink)  
Old 03-07-06, 08:50 PM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by End User
Try the FCK editor (http://www.fckeditor.net/) or HTMLArea (http://www.htmlarea.com/).
You can also take the above as a suggestion to examine existing code to learn what is involved in doing this. Explaining with enough detail to do you any good, is beyond the scope of forum posting.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Reply With Quote
  #7 (permalink)  
Old 03-08-06, 11:12 AM
Barnz1986 Barnz1986 is offline
Aspiring Coder
 
Join Date: Jan 2006
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
What I ment was I wanted to code my own, or use something like a class to make one. Not just download someone elses WYSIWYG editor.

Anyways I have found something called execCommand.

But there is a problem with the link and image insertion. It works fine but when I save the data to a file and then reopen it in the editor it adds the web URL again.

Example.

Web URL in Editor: http://www.domain.com
Save it to the file: http://www.domain.com
Re-open the file in the editor: http://www.domain.com/"http://www.domain.com
Re-save it to file: http://www.domain.com/"http://www.domain.com

Do you get what I mean, it works fine the first time but when it gets re-opened it adds the URL to the front of the link again.

It also does the same with an image.

Web URL in Editor: /path/image.jpg
Save it to the file: /path/image.jpg
Re-open the file in the editor: http://www.domain.com/"/path/image.jpg
Re-save it to file: http://www.domain.com/"/path/image.jpg

Its really annoying, any ideas how to fix it?

Like could I use str.replace or something?
Reply With Quote
  #8 (permalink)  
Old 03-08-06, 04:46 PM
Barnz1986 Barnz1986 is offline
Aspiring Coder
 
Join Date: Jan 2006
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
Its ok I have fixed the problem.
Reply With Quote
  #9 (permalink)  
Old 03-08-06, 04:47 PM
Barnz1986 Barnz1986 is offline
Aspiring Coder
 
Join Date: Jan 2006
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by End User
Then do it.
I have....
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WYSIWYG Editors Blaine0002 PHP 1 08-24-05 04:50 AM
open source html editors abtimoteo HTML/XHTML/XML 0 08-05-05 10:20 AM
WYSIWYG editor ? adubb PHP 4 04-21-05 06:26 PM
WYSIWYG editor for clients TPCpro Script Requests 3 12-02-04 07:44 AM
WYSIWYG Buttons austin322 JavaScript 7 08-16-03 06:23 AM


All times are GMT -5. The time now is 11:04 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.