How to add images within texts that stored in sqli

2019-08-11 08:56发布

问题:

I want to add some images between the texts. I stored texts in sqlite db. How can I determine the right location of images in texts. For example, I have 5 paragraphs in one lesson that I stored all those paragraphs in one cell of a row in db named body_of_lesson. Now I want to add an image after line 3 of first paragraph and 1 image after second paragraph. How can I determine these locations and add images into the locations? In other lessons might be vary the locations. I saved texts as HTML formatted into the database.

Please help me !!

回答1:

use image ref in your html. e.g. <a href="file:///**", which ** is the image path stored in sqlite.