博客文章中的表格数据与文本数据
我通常使用来自我自己创建的特定表(作为站点数据库的一部分)的表格数据。那些不是站点表的表(例如只是博客文章一部分的表)怎么样?
这些表格的特点是它们因帖子而异。每篇文章都会有文本和许多段落,但一篇文章可能有一个比较 PHP、Java 和 Python 的表格。然后另一篇文章比较了两个硕士课程,依此类推。这些表各不相同,有些帖子可能根本没有任何表,而其他帖子可能有多个表,所以我不知道在这里为它们创建数据库表是否有意义。
那么将这些表添加为博客文章的一部分最合乎逻辑的方法是什么?我真的更希望它们也可以轻松编辑。有什么好的建议来做到这一点吗?
I usually work with tabular data that come from a specific table that I created myself as part of the site database. How about tables that aren't site tables, like tables that are just part of a blog post?
The thing about these tables is that they vary from post to post. Each post would have text and many paragraphs, but one post could have a table that compares PHP, Java, and Python. Then another post compares 2 masters programs, and so on. The tables vary, and some posts might not have any tables at all, and other posts might have multiple tables, so I don't know if creating database tables for them makes sense here.
So what's the most logical way to add these tables as part of a blog post? I would really prefer to have them easily editable as well. Any suggestions for a good way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用所见即所得编辑器。 TinyMCE 或 CKEditor 会满足您的需求。
尝试:
您可以在两个演示中找到表格示例。
Use WYSIWYG editor. Both TinyMCE or CKEditor would fit your needs.
Try:
You can find tables samples in both demos.
您可以将表格保存在数据库中,并使用
{table: 1}
等宏将它们添加到帖子中。您可以将表格编辑器与帖子编辑器分开。You can save your tables in the database and add them to the post with marco like
{table: 1}
. And you can make table editor separately from post editor.