Jump to content

JAVA/PHP help! -- Changing and Adding Text inside a TextArea


Recommended Posts

Posted

Hi, this is quite important to me --

 

I'm making a company site, and need to make some sort of administrator's console, in which - among other things - the admin adds News, users and so on.

In teh "Add News" thing, I want to make the news "HTML" based, means that if there's <b>NEWS TITLE</b> it will appear bold on the news marquee. Obviously.

 

the thing is that the Company's site admins (they're not really admins, they'll just use the admin CP i am making) don't ahve much of a clue in HTML, so I want to make some simple buttons like "B" and "I"... much like there are in this site (when writing a reply or a new thread) -- VERY simple one, not an entire editor, just three or four actions that they can add.

 

So that if they mark "NEWS TITLE BLA BLA" inside the textarea and click on "B" then inside the textarea will appear the text

<B>NEWS TITLE BLA BLA</B>

 

Anyone knows how I do this? I have no clue how to even start, since I'm not that good with Javascript.

 

If anyone knows of a good resource about changing textarea text, I'll appreciate it!!!

 

 

Thanks a lot!!

 

~moo

  • 3 months later...
Posted

Here's an example I made on how to do this.

 

Edit: This new file is Valid XHTML 1.0 Transitional, sorry about the HTML mistakes.

biu.txt

Posted

duuuuuuuuuuuuuuuuuuude thanks!! I began to lose faith that anyone knows anything about this :)) thanks, I'll check it out now

 

~moo

Posted
duuuuuuuuuuuuuuuuuuude thanks!! I began to lose faith that anyone knows anything about this :)) thanks' date=' I'll check it out now

 

~moo[/quote']

 

No problem, I wrote it in a hurry and I made some HTML mistakes in there.. but I think you'd be able to fix those no problem...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.