Not if you want answers.jayshields wrote:I cna tpye hwo i wana ok!?
Javascript Rich Text Editor w/ Syntax Highlighting
Moderator: General Moderators
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Different text colors in a text area can be accomplished, but I am not sure how to make it dynamic. I know from some of my previous CMS development projects that IE displays HTML as the browser would display when it loads in a textarea, maintaining HTML tags and styles within the textarea.
FCK Editor (no, not the other word) is a very flexible client side rich text editor. Maybe you can combine the server-side functionality of GeSHi with the client side functionality of FCK to get what you want?
FCK Editor (no, not the other word) is a very flexible client side rich text editor. Maybe you can combine the server-side functionality of GeSHi with the client side functionality of FCK to get what you want?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
I have spent years working with the mshtml (HTML WYSIWYG) object and writting my own code editors from scratch, both in C++ using it's native interfaces and in javascript...
I have tried a few times to write a solid code editor using just javascript and I'm sure it's possible...but likely very slow to execute...
Without revealing all my secrets (I only partially support OSS movements)...
First off, rendering a structured data format (ie: HTML) is ALOT more time consuming than a linear data format...like source code
So using a HTML editor as a source code editor...isn't the best idea...
The easiest approach, but likely painfully slow (I tried a while back)...is basically wrap each keyword, etc with a span and it's associated class ID...
Using regex to locate comments, keywords, etc...
Everytime the buffer changes though, first stripping all HTML tags...on anything of decent size...is untolerable in speed
Good luck with that!!!
Cheers
I have tried a few times to write a solid code editor using just javascript and I'm sure it's possible...but likely very slow to execute...
Without revealing all my secrets (I only partially support OSS movements)...
First off, rendering a structured data format (ie: HTML) is ALOT more time consuming than a linear data format...like source code
So using a HTML editor as a source code editor...isn't the best idea...
The easiest approach, but likely painfully slow (I tried a while back)...is basically wrap each keyword, etc with a span and it's associated class ID...
Using regex to locate comments, keywords, etc...
Everytime the buffer changes though, first stripping all HTML tags...on anything of decent size...is untolerable in speed
Good luck with that!!!
Cheers