Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to convert images with alt attributes to HTML element #124

Open
NayanAnsh opened this issue Aug 19, 2023 · 0 comments
Open

Unable to convert images with alt attributes to HTML element #124

NayanAnsh opened this issue Aug 19, 2023 · 0 comments

Comments

@NayanAnsh
Copy link

The problem comes when Delta contains images with alt attribute. Below is Delta input

{attributes: {
{alt: 'sample alt'}, insert: {image:'data:image/jpeg;base64,/....'}}

output-
<img class="ql-image" src="data:image/jpeg;base64,/.....">
expected out put -
<img alt="sample alt" class="ql-image" src="data:image/jpeg;base64,/.....">
The delta is working correctly quilljs reader but for some reason when I convert delta to HTML then alt tags are missing

converter code -
var converter = new QuillDeltaToHtmlConverter(posts.body.ops,cfg); console.log("Data") converter.beforeRender((GroupType,data)=>{ console.log(data) }) var html = converter.convert(); // console.log("HTML----"); posts.body = html;
expected output -
image
output got -
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant