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.
LVL 20
Mark BradyPrincipal Data EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wysiwyg is more front end than back, the heavy plumbing is done on the browser via javascript
One very simple and good niceEdit easy to implement and easy to get data when submit form. You will face that problem because wysiwyg  editors inject iframe and what ever type you choose you must deal with javascript to get textarea content before submiting form.
Mark BradyPrincipal Data EngineerAuthor Commented:
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....
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Than use some Javascript in place edit for that you do not need wysiwyg. Easy solution is Scriptaculous AjaxEditInPlace.
Ray PaseurCommented:
I've used TinyMCE with pretty good success.  One caveat - some browsers disable cut and paste into a textarea, and if your clients are like mine, they want to be able to cut and paste from Word.  When they do this, they will inject all kinds of unwanted crap into the textarea, including strange quote characters, etc.  So you might want to make judicious use of strip_tags() before you store their information in your data base.

I've requested a moderator's attention to this Q, too.  Perhaps they can get the web programmers to tell us what they use for EE's text box.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mark BradyPrincipal Data EngineerAuthor Commented:
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:


Ray, thanks for requesting attention. I would like to know what EE are using! Cheers
Ray PaseurCommented:
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
Mark BradyPrincipal Data EngineerAuthor Commented:
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
Ray PaseurCommented:
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!
Ray PaseurCommented:
Sidebar afterthought... I think TinyMCE is what Wordpress uses.  Several million users can't be wrong!
Beverley PortlockCommented:
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.
Mark BradyPrincipal Data EngineerAuthor Commented:
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/

Mark BradyPrincipal Data EngineerAuthor Commented:
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
                //Step 4: Render Editor

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.
Ray PaseurCommented:
In a separate post, the EE developers declined my request to say what they were using.  

"Any EE staff who wish to contribute as experts will already be monitoring the zones they wish to assist in. I appreciate you taking the time to try and explore another avenue to assistance for the asker but at this time we have no plans to take this request any further."

This may be interesting to you:

Best regards, ~Ray
I use a very good commericial editor, RichEditor. I am using it on several high traffic, high value applications, and it works very well. It allows you to stat with a template, and only allow editing of portions of the page, and its image upload and manipulation functions are much better than TinyMCE or the other open source options.

It is not free, but if you value your time and your clients, it is worth the money.

Visit www.richarea.com 
Mark BradyPrincipal Data EngineerAuthor Commented:
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
Mark BradyPrincipal Data EngineerAuthor Commented:
Thanks for all your suggestions
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.