Link to home
Start Free TrialLog in
Avatar of Mark Brady
Mark BradyFlag for United States of America

asked on

I need a good WYSIWYG editor for use with php and mysql

Currently I write CMS websites and use a textarea to allow the user to edit data. The only problem is, that is unformatted and in order for their pages to look right, they need to know html tags so they can create paragraphs and have bold text etc... I need to replace the textarea with a WYSIWYG editor like a rich text editor or something. I know they are out there but wanted to ask the experts have you used any of these and which one would be the quickest to implement?

I don't want to have to install something on my server (host server) just something simple I can use to save formatted data back to mysql using php and retrieve formatted data and display it for the clients.

Thanks in advance.
SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark Brady

ASKER

cyberkiwi: The users must log into their accounts before they can edit the content of their pages therefore this is what I consider backend although it is really only displaying a certain page in their browser if they are correctly logged in. What they see is what they get is what I need to have on that page so they can see how their page will look. It is mainly for text.

Thanks to both, I will check those editors out and get back....
Than use some Javascript in place edit for that you do not need wysiwyg. Easy solution is Scriptaculous AjaxEditInPlace.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the suggestions. I'm slowly getting through reading all about these editors. I did think of writing my own so I could make it custom but that would require plenty of spare time, something I do not have. One thing I have notice with almost all of these WYSIWYG editors is the lack of font changing features. Most do not allow you to change font or font color or size. That would be the most common thing a client would want to do you would think.

Here is a nicely formatted editor that has tons of options. In fact it has toooooooo many. All these options would only confuse my clients. There is a way to onllt show a normal reduced version of this but I haven't worked that out yet. It is called Cute Editor for Php and is available here:

http://phphtmledit.com/

Ray, thanks for requesting attention. I would like to know what EE are using! Cheers
TinyMCE can change fonts and colors.  You can customize the controls that are available to the clients.  It has been a while since I customized one, but I recall that it was almost as easy as drag-and-drop.  HTH, ~Ray
Hmmm I'll take a look at that one. I am quite liking this Cute Php Editor though. It has heaps of features. Just need to learn how to turn off most of them cause it will confuse people that aren't in the know. I try not to give people to much rope so they don't hang themselves! Merry Xmas by the way
Cute may be your best choice.  Anyway, please leave the Q open for a couple of days -- the moderators may be on holiday ;-)  Can't hurt to get another suggestion or two.

Merry Christmas to you, too!
Sidebar afterthought... I think TinyMCE is what Wordpress uses.  Several million users can't be wrong!
We use TinyMCE for all our CMS stuff. Works well and has a "paste from Word" button that removes all the **** that office puts in and when you've seen the size of an MS-Office generated "Hello world" page..... well, the button's a necessity  IMNSHO.
Yeah I will leave this open for a few more days. I will take a good look at TinyMCE thanks...
Hi Elvin.


Indeed TinyMCE is one of the good Editor. You can also take a look at FCKEditor. http://ckeditor.com/

Regards
It looks like there is indeed quite a few good editors out there. I had no idea! I have proceeded to use Cute  Php Editor for the current project I am working on. I am editing the page content now and it's very simple to use and implement. All you do is include the php file into your page and a few lines of code and you are away!. Here is how simple it is.

<?php // your editing page
require_once "cuteeditor_files/include_CuteEditor.php";
$sql = "SELECT content FROM pages WHERE title = '$selected_title' LIMIT 1";
$result = mysql_query($sql);
$nums = mysql_num_rows($result);
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$content = "{$row['content']}";
}
// Now we have the page content so display the editor...and a form
echo <form method='POST'>";
echo "<input type='hidden' name='edit' value='1'>";
     //Step 2: Create Editor object.
                $editor=new CuteEditor();
            $editor->Width = "700px";
            $editor->Height = "500px";
            $editor->EditorBodyStyle="font-family: Arial";
                $editor->Text = $content;
                //Step 3: Set a unique ID to Editor
                $editor->ID="Editor1";
                //Step 4: Render Editor
                $editor->Draw();

echo "<input type=\"submit\" value=\"Save\" /></form>";


That's how easy this one is so I will use it for this project but I have another project on my waiting list that I will use TinyMCE for and see how that one works. Thanks to everyone for the great suggestions. I will split the points up but want to wait and see if the moderators will respond with what they use on EE.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I don't mind paying for a good quality script if I can re-use it over and over on different applications. I have however decided to continue for now with the one I'm using
Thanks for all your suggestions