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

Add support for html underline and videos #1955

Merged

Conversation

CatHood0
Copy link
Collaborator

Description

If you try to use DeltaX.fromHtml with a tag <u> to use it as a underline style, then will be removed and just pass content as plain. Videos has the same result of the before one, if you try to use an <iframe> will be paste as a plain text or removed (idk really this last one case).

Related Issues

Fix #1917
Fix #1945

Improvements

  • Was added support for local underline syntax to detect and apply on resulting delta.
  • Was added support for iframes with video url's (by now just can verify youtube videos)

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the package version in pubspec.yaml files.
  • All existing and new tests are passing.
  • I have run the commands in ./scripts/before_push.sh and it all passed successfully

Breaking Change

Does your PR require developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

CatHood0 added 5 commits June 27, 2024 22:21
fix: issue where when html2md parse <em> to "_" instead of "*" that won't be detected MarkdownToDelta converter
feat(test): added test for DeltaX
feat: added config classes to MarkdownToDelta and html2md that allow users configure their own styles
@CatHood0 CatHood0 requested a review from EchoEllet June 28, 2024 19:14
@EchoEllet
Copy link
Collaborator

Thank you for your contributions, I will review and test the changes soon.

Copy link
Collaborator

@EchoEllet EchoEllet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding tests, I haven't tested this change yet.

Just a few things to consider before releasing this change.

lib/src/models/documents/delta_x.dart Outdated Show resolved Hide resolved
lib/src/utils/html2md_utils.dart Outdated Show resolved Hide resolved
@CatHood0 CatHood0 force-pushed the add_underline_and_video_html_support branch from dcfc228 to acf6336 Compare June 28, 2024 22:01
@singerdmx
Copy link
Owner

singerdmx commented Jun 28, 2024

@CatHood0 Please resolve the conflict. Please do not worry too much about where the best place is to put the code. I believe @ellet0 can always move around code to make sense OOD wise.

@CatHood0
Copy link
Collaborator Author

Yeah, i'm trying to resolve the before commit t

@singerdmx
Copy link
Owner

@ellet0 I am going ahead and merging this. Please feel free to patch it after this.

@singerdmx singerdmx merged commit 1f32e84 into singerdmx:master Jun 28, 2024
2 checks passed
@CatHood0 CatHood0 deleted the add_underline_and_video_html_support branch June 28, 2024 22:45
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

Successfully merging this pull request may close these issues.

Converting from HTML not rendering the videos and the iframes Underline Styles
3 participants