ChopinDavid / flutter_widget_from_html_core

MIT License
1 stars 1 forks source link

Not able to render complex html #1

Open 7utkarsh7 opened 8 months ago

7utkarsh7 commented 8 months ago

Browser not responding on rendering the following html string

Usage:

`Widget buildHtmlWidget(String content) => HtmlWidget(
        content,
        textStyle: TextStyles.dark0(
          fontSize: 14,
        ),
        customWidgetBuilder: (element) {
          if (element.localName.has('video')) {
            final videoUrl = QuillConverters.getMediaSrc(element);
            if (videoUrl.isNullOrEmpty) return null;
            return AppVideoPlayer(
              key: UniqueKey(),
              controller: AppVideoPlayerController(
                videoUrl.trim(),
                enableFullScreen: false,
              ),
              autoPlay: false,
              mute: false,
            );
          }
          if (element.localName.has('iframe')) {
            final videoUrl = QuillConverters.getMediaSrc(element)
                .trim()
                .replaceAll('embed/', 'watch?v=');
            return AppYoutubePlayer(
              controller: AppYoutubePlayerController(
                url: videoUrl,
              ),
            );
          }
          return null;
        },
        onTapUrl: (url) {
          controller.launchUrl(url);
          return true;
        },
      );`

String: <table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1<table aria-describedby=\"course-list-new_info\" cellspacing=\"0\" width=\"100%\">Grading pending test1

ChopinDavid commented 8 months ago

@7utkarsh7 I'm sorry, I've not used this package in some time. Were you using my fork for the custom font functionality? If so, I could maybe get in a proper PR to the upstream.

7utkarsh7 commented 8 months ago

Yes, please do.