• Welcome to Valhalla Legends Archive.
 

[PHP] Text Editor

Started by j0k3r, February 16, 2004, 04:14 PM

Previous topic - Next topic

j0k3r

Alright I just got another job from a guy I've done some stuff with before. This time he has asked me to develope a text editor(similar to the "new mail" one in hotmail) so that he(or his customers) can change how a page looks without having to open it up in notepad and edit through HTML code.

I personally can't see how this can be done using PHP, he said he's seen it done with javascript, so I'd figure it is possible, but like I said I don't see how it can be done. Can somebody enlighten me as to how this could potentially be done?
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

j0k3r

#1
Oh yeah he IS paying me for this so I'd be willing to work with someone and give them a cut. I am not asking someone to do this for me, I like learning PHP, but this isn't something I think I'll be able to do alone and might need some guidance on.
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

j0k3r

Er, the e-mail I check is [email protected], e-mail me if interested, or my AIM is j0k3rKZ.
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

Forged

I know I have seen a tutorial on how to do that somewhere but I am not sure where.  try http://www.phpfreaks.com/ I think they probally have it, and if not you can definatlly get help in their forums.
QuoteI wish my grass was Goth so it would cut itself

FLiPPY_


iago

#5
I did something exactly like that in JSP, if that will help.  It's technically proprietary code, but I can show it to you if you want a reference, just don't use it :P

<Edit> it lets them load a text file off the server (verifies it's not binary) that's under some constant length (100kb, I think) and edit it, then save.  It also has some Javascript buttons that add html tags.  Will that help?
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


j0k3r

#6
NOOOOOOOOOOOOOOOOO dumbass back button, gotta retype my post.

iago, yes that would probably help some. My problem lies mostly in that PHP is a scripting language, and once the script is executed nothing else can be done to it (no interactivity really). To do this you would have to reload the page every time a change is made, which isn't very efficient... Also clicking the bold button wouldn't work because as I said, once it's executed there's nothing else that PHP can do (PHP get's output'd as 100% HTML, and only the final result is displayed).

Somebody please correct me? I'd be glad to be wrong in this case.
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

iago

Yes, you're right.  JSP and any other scripting is the same way.

The way I do it is with a <textarea> containing the page, and a "Save" button at the bottom.  
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


j0k3r

Quote from: iago on February 18, 2004, 09:11 PM
Yes, you're right.  JSP and any other scripting is the same way.

The way I do it is with a <textarea> containing the page, and a "Save" button at the bottom.  
Oooops, didn't read your post thoroughly I thought you said in Java... Yeah for sure it will help then, you know where to find me.
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

iago

It would be possible to do it in Java, with an applet, but difficult
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


j0k3r

QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo