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

Still facing the issue -customWidgetBuilder builds text on newline #1319

Open
aswathyMVP opened this issue Aug 19, 2024 · 3 comments
Open

Still facing the issue -customWidgetBuilder builds text on newline #1319

aswathyMVP opened this issue Aug 19, 2024 · 3 comments
Labels
question Further information is requested

Comments

@aswathyMVP
Copy link

Steps to Reproduce

customWidgetBuilder: (element) {
if (element.localName == 'img') {
final src = element.attributes['src'] ?? '';
if (src.endsWith('.svg')) {
/// Return the custom SVG widget
return SvgPictureNetwork(src);
} else if (element.localName == 'svg') {
// Handle inline SVG
final svgString = element.outerHtml;
return SvgPictureNetwork(svgString);
}
}
// Return null for other elements to use default handling
return null;
},

HTML
`HtmlWidget` configuration
Tesing environment

Expected results

Actual results

@aswathyMVP aswathyMVP added the bug Something isn't working label Aug 19, 2024
@aswathyMVP aswathyMVP changed the title Still facing the issue - #779 Still facing the issue -customWidgetBuilder builds text on newline Aug 19, 2024
@aswathyMVP
Copy link
Author

#779 Tried the solution mentioned but not worked

@daohoangson
Copy link
Owner

Have you tried wrapping your custom widget inside InlineCustomWidget?

@daohoangson daohoangson added question Further information is requested and removed bug Something isn't working labels Sep 29, 2024
@vishal0768
Copy link

by using InlineCustomWidget we can make it inline, but I am getting one more issue on this, that is if i have custom widget in this who has inkwell, and if the custom widget comes at start of the sentence, it actually make it partially clickable for some reason.
do you have any solution for this @daohoangson

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

No branches or pull requests

3 participants