(html) phpmyadmin 中文本字段的所见即所得编辑器

2022-01-05 00:00:00 mysql phpmyadmin wysiwyg

我正在制作一个小型网站,我需要任何人接手添加一些内容,这些内容存储在三个表中,到 13 年 9 月将有最多 500 条记录(小东西).现在我正在使用 phpmyadmin,但是添加文本(其中一个表格是一个迷你博客)需要基本的 html 技能,我敢肯定谁接管"不具备.你知道吗,或者:

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) 一种将所见即所得编辑器与 phpmyadmin 集成的方法(至少对于 TEXT 字段)

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

b) mysql 的一个重要前端,它支持编辑表格(只是内容,而不是结构)——我可以自己在其中嵌入一个编辑器?

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:感谢编辑器的建议,但这是次要问题:目前我需要一种方法将任何此类编辑器嵌入到 phpmyadmin(否则我必须编写前端我自己)...

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:

从这里获取 TinyMCE:

Get TinyMCE from here:

http://www.tinymce.com/

在您的 phpmyadmin 文件夹中提取包,例如在我的情况下,我将主要内容放在这里:D:Program FilesWampappsphpmyadmin iny_mce 所以 tiny_mce.js 文件位于此补丁 D:Program FilesWampappsphpmyadmin iny_mce iny_mce.js

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

然后打开phpmyadmin文件夹中的tbl_change.php文件,在<?php后添加流动代码:

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>';

这将在 phpmyadmin 中编辑记录的所有文本区域中添加 TinyMCE,如果您在其他地方需要它,只需查看 phpmyadmin 右侧 iframe 中正在加载的文件,并将该代码也添加到该文件中.

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.

相关文章