@graphteon/juricode
Version:
We are forging the future with lines of digital steel
21 lines • 593 B
JavaScript
export const parseCellContent = (content, imageUrls) => {
const lines = [];
let currentText = "";
for (const line of content.split("\n")) {
currentText += `${line}\n`;
}
if (currentText) {
lines.push({ type: "plaintext", content: currentText });
}
if (imageUrls && imageUrls.length > 0) {
imageUrls.forEach((url) => {
lines.push({
type: "image",
content: ``,
url,
});
});
}
return lines;
};
//# sourceMappingURL=parse-cell-content.js.map