Jump to content

rich text editor


Nothadoth

Recommended Posts

hey guys,

 

i really need help. im struggling to hell to find a premade script for what i need.

 

I have my content stored in a database. I need a rich text editor (so the user doesnt need to include HTML) so they can edit contact. So a rich text editor that displays whats in the current content field and can be edited so on submit it updates the field to have the new text. Get what i mean?

 

can anyone help me find one?

 

thanks

 

Link to comment
Share on other sites

Okay..

Make one.

<?php
$contents = file_get_contents('script.txt');
if ($_POST){
$contents = $_POST['contents'];
$open = fopen('script.txt', 'w');
$do = fwrite($open, $contents);
fclose($open);
if (isset($do)){
echo 'Saved.'; }
else { 
echo 'Failed'; }
} 
echo '<form action="index.php" method="post"><textarea name="contents">' . $contents . '</textarea><input type="submit" value="Save"></form>';
?>

Link to comment
Share on other sites

I need it so that when you go down a line in the text box it automatically incorporated html.

 

So for example in the box you write:

 

"Hello,

Test."

 

Instead of it coming out as "Hello, Test." it needs to generate "Hello,<BR>Test."

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.