维护具有多个段落和图像的博客的数据库 [英] Maintaining database for a Blog with multiple Paragraphs and images

查看:59
本文介绍了维护具有多个段落和图像的博客的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在开发一个博客网站,帮助用户发布内容,例如

1级标题

描述

2级子标题

图片

描述



我怀疑是这个 - > 2级子标题将是未指定的,即用户可以有任意数量的这个,他也可以添加图像或只是文本或只是图像。所以在这种情况下如何将数据添加到DB,将数据作为html标记插入是否更好?简而言之,有一个主题有多个段落,其中一些段落包含图像,所以当我从DB中检索数据时,如何显示相应段的图像。这是一种更好的方式来使用HTML标签,或任何其他方式。请帮助我,希望你理解

Hello,
I am developing a blogging site which helps users to post content like
Level 1 heading
Description
Level 2 Sub heading
Image
Description

My doubt is this -> Level 2 Sub heading will be unspecified, ie user can have any number of this, also he can add an image or just text or just an image.So in this case how can i add data to DB, Is it better to insert the data as html tags. In short there is a topic with multiple paragraphs,some of the paras contains images, so when i retrieve data from DB, how can i show an image of that corresponding para.Is it a better way to use HTML tags, or any other ways. Please help me, hope you understood

推荐答案

您是否尝试过免费的高级网络文本编辑器/富文本框,如 ckeditor [ ^ ]或 freetextbox [ ^ ]?

它非常适合您的要求。



为什么我建议您使用这种短信服务器

1.它自动将图像保存到ftp服务器并仅将HTML内容保存到数据库。

2.用户几乎完成与MS Word类似的所有编辑和装饰工作。

3.用户可以直接从MS Word粘贴内容,格式也不会丢失。

4.许多高级功能可以格式化内容,类似于您在问题中描述的场景。



希望它有所帮助。

如果我错过了什么,请告诉我:))
Have you tried free advanced web text editors/ rich textbox like ckeditor[^] or freetextbox[^]?
It's just perfect for the kind of your requirement.

Why I recommend you to use this kind of texteditors is
1. It saves images to the ftp server automatically and saves only the HTML content to the database.
2. User do almost all the editing and decorating work similar to MS Word.
3. User can paste content directly from MS Word and formatting will not be lost.
4. Many advanced functionality to format the content similar to the scenario you have described in the question.

Hopefully it helps.
In case I missed something, please let me know :)


这篇关于维护具有多个段落和图像的博客的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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