|
@@ -542,6 +542,18 @@ function parseMd(content) {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ if (line.includes("image: ")) {
|
|
|
+ $("#cfile-file").attr("src",`${line.replace("image: ", "https://bhouse.com.tw").replaceAll('"', "")}`);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (line.includes("cover_img: ")) {
|
|
|
+ $("#cnewcoverimg-file").attr("src",`${line.replace("cover_img: ", "https://bhouse.com.tw").replaceAll('"', "")}`);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (line.includes("owner_img: ")) {
|
|
|
+ $("#cnewownerimg-file").attr("src",`${line.replace("owner_img: ", "https://bhouse.com.tw").replaceAll('"', "")}`);
|
|
|
+ }
|
|
|
+
|
|
|
if (line.includes("collection_slider: ")) {
|
|
|
let slider = $("#ccollslider").val(
|
|
|
line.replace("collection_slider: ", "").replaceAll('"', "")
|
|
@@ -653,23 +665,23 @@ function parseMd(content) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- if (line.includes("<img") || foundImg) {
|
|
|
+ if (line.includes("<iframe") || foundYT) {
|
|
|
crossLine += line;
|
|
|
- foundImg = true;
|
|
|
- if (line.includes("</img>")) {
|
|
|
- rblocks.push({ type: "img", text: crossLine });
|
|
|
- foundImg = false;
|
|
|
+ foundYT = true;
|
|
|
+ if (line.includes("</iframe>")) {
|
|
|
+ rblocks.push({ type: "youtube", text: crossLine });
|
|
|
+ foundYT = false;
|
|
|
crossLine = "";
|
|
|
}
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- if (line.includes("<iframe") || foundYT) {
|
|
|
+ if (line.includes("<img") || foundImg) {
|
|
|
crossLine += line;
|
|
|
- foundYT = true;
|
|
|
- if (line.includes("</iframe>")) {
|
|
|
- rblocks.push({ type: "youtube", text: crossLine });
|
|
|
- foundYT = false;
|
|
|
+ foundImg = true;
|
|
|
+ if (line.includes("</img>")) {
|
|
|
+ rblocks.push({ type: "img", text: crossLine });
|
|
|
+ foundImg = false;
|
|
|
crossLine = "";
|
|
|
}
|
|
|
continue;
|