(html) wysiwyg editor for TEXT fields in phpmyadmin

橙三吉。 提交于 2019-12-02 12:27:59

I think CK editor is what you are looking for, you can see for yourself here: http://ckeditor.com/

Here is a solution for you, I have to say that doing this is completely wrong, but if you really need it, then here is the way:

Get TinyMCE from here:

http://www.tinymce.com/

Extract the package in your phpmyadmin folder, for example in my case I put the main contents here: D:\Program Files\Wamp\apps\phpmyadmin\tiny_mce so the tiny_mce.js file is located at this patch D:\Program Files\Wamp\apps\phpmyadmin\tiny_mce\tiny_mce.js

Then open the file tbl_change.php in your phpmyadmin folder and add the flowing code after <?php:

echo '<script type="text/javascript" language="javascript" src="tiny_mce/tiny_mce.js"></script>'
.'<script language="javascript" type="text/javascript">'
.'tinyMCE.init({'
.'theme : "advanced",'
.'mode : "textareas",'
.'language : "en"'
.'});'
.'</script>';

This will add the TinyMCE in all textareas of editing a record in phpmyadmin, if you needed it somewhere else, just take a look at what file is being loaded in phpmyadmin right iframe, and add that code to that file too.

I repeat that doing this is completely wrong, just do it if you really need it.

I am using jHtmlArea, a jQuery plugin, as a very simple and quick way to implement a solution for a case just like yours: http://jhtmlarea.codeplex.com/

It is really really simple to use it, in the front-end. But I have not used phpMyAdmin nor any other "essential frontend". I have coded a simple back-end PHP script to save the contents into the database.

In the back-end, I am also using HTML Purifier to clean the HTML, and HTML Tidy to prettify it.

This is also useful TinyMCE "www.tinymce.com" , this WYSIWYG is seen in wordpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!