Custom <TEXTAREA>
Ok, after looking at the code, I know this is not an actual but man, is this some fantastic coding. Anyone know of a tutorial site to build something like the following:
**UPDATE** found out you only get the advanced editor in IE 5.5 or better, sigh, what a shame.
visit http://www.phpaddict.com/ and choose any topic area. Next choose "New Topic" to open their editor. Now in the editor, enter the following: (Note, remove the spaces between the brackets and the word CODE, had to use that so the editor on this site wouldn't process them).
Quote: The following is code
[ CODE ]
This is lines of code here
More Lines
[ /CODE ]
That was the code
Now click on PREVIEW to preview the post.
Just like on here, in the preview, the code is offset in a box. But look at the editor! It is in the box visually there as well!
Also, keyboard shortcuts such as CTRL-B, CTRL-I (for bold and italics) work. Several times after doing a lot of posting on there, I'll go on other forums, including this one, I hit CTRL-B and the "Bookmarks" dialog comes up
I wasn't sure if there is a canned script out there to do this type of custom editor, or if it was stictly something designed by the makers of that forum software.
(Note, there are some glitches in that system. ie. copy text from another window and paste it in that editor, you have to move the cursor to get it to display what you just pasted. And sometimes, moving around right before/after to get in or out of a code box can get tricky)
Though you might like to see that editor and hopefully someone knows of a tutorial for doing that type of thing.
-Greg
Abhishek Reddy posted this at 11:38 — 17th November 2004.
He has: 3,348 posts
Joined: Jul 2001
That site requires membership. But I think I know what you're talking about. It's called a "rich text area", and isn't really a textarea. Two popular ones I know of:
Rich Text Editor (free) http://www.kevinroth.com/rte/demo.htm
Editize ($$, Java) http://www.editize.com/
Abhishek Reddy posted this at 11:42 — 17th November 2004.
He has: 3,348 posts
Joined: Jul 2001
Also, you can choose "Enhanced Interface" in control panel > options > message editor interface. Keyboard shortcuts work here. I wonder if this uses RTE.
Greg K posted this at 15:26 — 17th November 2004.
He has: 2,145 posts
Joined: Nov 2003
Hmm, I didn't think you needed membership to post, as there are always posts by "Guest" who is unregistered. LOL
The second link you provided looked like it was a java applet, (their demo didn't work for me). This has the plus side that it will work with more than just IE
I found the link to the BB software, http://www.wowbb.com/features.php on that page if you click WYSIWYG, then on the right side click "See it in action" for a demo.
-Greg
PS. I just changed my editor preferences. Thank you!!
Abhishek Reddy posted this at 16:04 — 17th November 2004.
He has: 3,348 posts
Joined: Jul 2001
wowbb's demo is just a normal textarea to me. Using the toolbar buttons only inserts bbcode. There's no WYSIWYG there.
Yeah, Editize is just an applet. But it works. May take a while to load. RTE is supposedly cross-browser. I guess it uses different APIs for the major ones.
I personally don't like the enhanced interface. Too slow loading on dialup.
Greg K posted this at 04:39 — 19th November 2004.
He has: 2,145 posts
Joined: Nov 2003
Are you using IE for PC?
I here is the code for that area in IE (the eerewr was just what I typed so I had something to search for in the source code to find where the code was:
<DIV TABINDEX="3" ID="text_editor" CONTENTEDITABLE CLASS="texteditorenhanced"
ONKEYUP="save_cursor_pos()" ONMOUSEUP="save_cursor_pos()" ONFOCUS="save_cursor_pos()">eerewr</DIV>
<script TYPE="text/javascript">text_editor.focus();</script>
In a perfect world, all browsers would render everything to standards so it looks the same. Unfortuently for Bill (Gates) his plan on this by shoving IE down our throats didn't work. I was a Netscape diehard. Remember when Netscape 3 was new?? LOL
I love sites the demonstrate using the features not normally used. I thought this site (http://www.yaromat.de/macos8/ fantastice 3 years ago when it came out. (again, requires IE on a PC and pop up blocker disabled to fully finction). One day I loaded the page on all 3 computers in a lab at the university. Should of seen the faces when people came in HAHHA.
For those who can't view it, it would scroll text in the browser window saying it was deleting all the windows files, then say it was loading MAC OS. (you see this on any browser i think when you click the link). Then it opened a new window, and changed it's size and position so it was full screen, litterally, covereing the entire screen. The web page it displayed was an emulated version of MAC OS 8 I think it was.
I once made a fake Blue Screen of Death page, and used the same code they did to make it full screen. I sent the link to a friend. He called me to complain that every time he tried to go to the site his computer locked up and he had to hit RESET. (I don't do that anymore, but it was funny at the time.)
-Greg
Abhishek Reddy posted this at 11:54 — 19th November 2004.
He has: 3,348 posts
Joined: Jul 2001
Firefox on Windows. If I had it my way it would be Firefox on Linux. No software issues here.
I have no idea why I can't see the WYSIWYG. But I know what you're talking about, so no worries.
heh yeah, those pranks were great... back when people used to actually fall for them in the first second of the sequence.
Greg K posted this at 21:08 — 19th November 2004.
He has: 2,145 posts
Joined: Nov 2003
The best prank on the newbies back in the day (calling BBS's (the kind you dial into) not the internet) was telling someone in chat to hit the plus sign three times or to do CTRL-ALT-DEL (this is back before windows prompting you, when doing this would immediatly reboot the system...)
(For those who don't know, when your modem dials and connects, it passes data beting transfered back and forth. When you are using termnial software, entering +++ tells the modem to go back to command mode, and [basically] you stop receiving data. So the person falling for it would end up havng to hang up and redial)
I'll stop now before I get reminising too much about the old BBS days.... sigh...
-Greg
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.