You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`import { QuillDeltaToHtmlConverter } from "quill-delta-to-html";
import Delta from "quill-delta";
function transformImagesToCustomBlot(delta) {
//only width attribute is applied by the library. height is ignored. transformImagesToCustomBlot is requied to apply both
const newDelta = new Delta();
delta.ops.forEach(op => {
if (op.insert && op.insert.image) {
// Replace with custom blot format
newDelta.insert({ customImage: { src: op.insert.image, alt: '' } }, op.attributes);
} else {
// Copy other operations as-is
newDelta.push(op);
}
});
the height attribute on delta for image is ignored and only width attribute is applied on img tag.
The text was updated successfully, but these errors were encountered: