Jump to content

Coding own WYSIWYG news/admin panel.


eddorey2k3

Recommended Posts

Hey,

Ok. So i've coded myself a nice little script to update the news section of my website. Works like a charm. However, the text area that you input the actual content of the news isn't all that smart (As you'd expect, it's just a text area), so all formatting has to be entered manually (Paragraphs, breaks, etc etc).

What I'm trying to do, is now that the news panel is finished, is find a way of making it so any breaks in the content get auto formatted into the MySQL string that will get input into the database.

I hope that makes sense, but as an example, if I were to do:
[code]
Todays news is
That I like cheese.
[/code]

At the moment, it would come out as "Todays news is That I like cheese." For this reason, I'd need to put the suitable <br>'s in. What I want, is something to recognise it's on 2 lines, and auto insert the <br>'s and <p>.

Any ideas?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.