Giter VIP home page Giter VIP logo

htmlconvertercompose's People

Contributors

cbeyls avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

htmlconvertercompose's Issues

Support determining the style of hyperlinks

Right now hyperlinks are always underlined and it would be nice if it was possible for clients to define the SpanStyle used there.

I understand this goes beyond the scope of replacing Android's Html.fromHtml() API, so I totally understand if it’s also out of the scope of this library. But since this may potentially be a blocker for some people (it would be for me), I thought I would still file this just in case.

I guess the simplest option would be to receive a urlSpanStyle as an argument for AnnotatedStringHtmlHandler. I’m hoping since we’re already receiving the compactMode boolean there, this won’t hurt the API too much.

I’ll open a PR so it hopefully helps discussing about this change. And thanks a lot for open sourcing this ❤️

Support <br> (instead of only <br/>)

I’m not a line break tag expert and I don’t have any authority over the topic, but it seems that just <br> is a pretty popular and well accepted form of using the line break tag. I actually thought this was a bug in the library since my line breaks weren’t working, but then I realized it explicitly doesn’t do anything on the line break tag open. I thought the fix would be to simply do the same thing we do on tag close, but it seems there’s more to it.

This is what the sample looks like right now, with a red box at the bottom so we can observe the bottom space of the text:

sample

If I simply change the <br /> to a <br> in the sample, this is what we get:

sample2

We lost the line break as expected, but for some reason now we have a line break at the end of the text. So if I proceed with the fix I had in mind, this is what I get:

sample3

Line break is back but 1. it’s just a single line break now for some reason, and 2. the mysterious line break in the end remains. I haven’t investigated it further and I thought I’d file the issue just in case this is already something known.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.