(html)phpmyadmin中TEXT字段的wysiwyg编辑器 [英] (html) wysiwyg editor for TEXT fields in phpmyadmin

查看:86
本文介绍了(html)phpmyadmin中TEXT字段的wysiwyg编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个小型网站,我需要谁来接管来添加一些内容,这些内容存储在三个表中,到13年9月,最多将有500条记录(小东西).现在,我正在使用phpmyadmin,但是添加文本(其中一个表是微型博客)需要基本的html技能,我敢肯定,谁接管"都没有.您知道吗?

a)一种将所见即所得编辑器与phpmyadmin集成的方式(至少对于TEXT字段而言)

b)mysql的一个基本前端,它支持编辑表(只是内容,而不是结构)–我可能自己在其中嵌入编辑器?

编辑:感谢编辑器的建议,但这是第二个问题:目前,我需要一种将任何此类编辑器嵌入phpmyadmin的方法(否则,我必须编写前端我自己)...

解决方案

这是为您提供的解决方案,我不得不说这样做是完全错误的,但是如果您确实需要它,那就是这样的方法:

从此处获取TinyMCE:

http://www.tinymce.com/

将软件包提取到您的phpmyadmin文件夹中,例如,在我的情况下,我将主要内容放在此处:D:\Program Files\Wamp\apps\phpmyadmin\tiny_mce因此,tiny_mce.js文件位于此修补程序D:\Program Files\Wamp\apps\phpmyadmin\tiny_mce\tiny_mce.js

然后在您的phpmyadmin文件夹中打开文件tbl_change.php,并在<?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>';

这会将TinyMCE添加到在phpmyadmin中编辑记录的所有文本区域中,如果您在其他地方需要它,只需查看iframe内phpmyadmin中正在加载的文件,然后将该代码也添加到该文件中即可. /p>

我重复一遍,这是完全错误的,只是在您确实需要时才这样做.

i'm making a small website and i need whoever takes over to add some content, stored in three tables which by sep '13 will have at most 500 records (small stuff). right now i'm using phpmyadmin, but adding text (one of the tables is a mini blog) requires basic html skills, which i'm sure "whoever takes over" doesn't have. do you know, alternatively:

a) a way to integrate a wysiwyg editor with phpmyadmin (at least for the TEXT fields)

b) an essential frontend to mysql which supports editing tables (just the content, not the structure) – in which i might embed an editor myself?

edit: thanks for the editor suggestions, but that's a secondary problem: at the moment i'd need a way to embed any such editor to phpmyadmin (otherwise i'd have to write the frontend myself)...

解决方案

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.

这篇关于(html)phpmyadmin中TEXT字段的wysiwyg编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆