
若引用JS文件,或者CSS文件,可分几次 拼HTML,导入
procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); var FileContent: TStringList; s:string; begin FileContent := TStringList.Create; // 假设你的HTML文件位于Web服务器的根目录下,文件名为a01.html FileContent.LoadFromFile( ExtractFilePath (ParamStr (0))+ '\quill.js'); //导入 quill.js 要注意导入 顺序 s:=s+'<script >'+ FileContent.Text+'</script >'; FileContent.LoadFromFile( ExtractFilePath (ParamStr (0))+ '\quill.snow.css'); //导入 quill.snow.css s:=s+'<style type="text/css" >'+ FileContent.Text+'</style>'; FileContent.LoadFromFile( ExtractFilePath (ParamStr (0))+ '\index.html'); // 导入 主页 s:=s+ FileContent.Text; Response.Content := s; Response.ContentType := 'text/html; charset="UTF-8"'; Handled := True; FileContent.Free; end;
若引用JS文件,或者CSS文件,jpg图片也直接写入HTML文件,一次性导入
<script src="https://cdn.bootcdn.net/ajax/libs/quill/2.0.2/quill.js"></script> <link href="https://cdn.bootcdn.net/ajax/libs/quill/2.0.2/quill.snow.css" rel="stylesheet">
<script >
/*! quill.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Quill=e():t.Quill=e()}(self,(function(){return function(){
</script >
<style type="text/css"> /*!quill.snow.css * Quill Editor v2.0.2 .ql-container{box-sizing:border-box;font-famil </style>
图片转换为Base64编码
我做的图片与Base64互转(添加水印文字,支持BMP,PNG,JPG,GIF)
在线转换https://www.sojson.com/image2base64.html
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA..." alt="Base64图片示例">
浙公网安备 33010602011771号