GithubHelp home page GithubHelp logo

htmlcompat's People

Contributors

berviantoleo avatar colinrtwhite avatar pflammertsma 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

htmlcompat's Issues

Support for custom <span> handling

A project Im working on now, we recieve html that has tags with a class attribute. Something like this:
Now we are going to use a <span class="span_class">span tag and apply a class to it</span>

We cant handle this with TagHandler.
Html and HtmlCompact have basic support for span styles, which means any unsupported tags will get swallowed.

How about about another callback that will let us explicitly handle spans ourselves.

reference #16

New release

It would be nice to get the changes included in 7fb63a2

Do you have plans on making a new release?

<del> or <strike> tag is not working

I'm using this library in my project but i've seen <strike> and <del> tags are not working.

    String priceString="<del>123</del>";//model.getPriceHtml();
    Log.e("Price",priceString);
    holder.price.setText(HtmlCompat.fromHtml(mContext,priceString,HtmlCompat.FROM_HTML_MODE_LEGACY));

The parent color is getting applied to the child span tag even though it has inline color of its own

I am pass this String as Html text to HtmlCompat class
red yellow

but here the first parent span tag "red" is getting red color applied but the child span .i.e. "yellow" is also getting red color applied. But instead it should get yellow color to the text since I am adding style with color yellow.

Can you guys help me or am I doing something wrong.

Below this the code that i am doing:
textView.setText(
HtmlCompat.fromHtml("red yellow",HtmlCompat.FROM_HTML_MODE_LEGACY));

here i am creating instance of TextView and adding that view programmatically
Screenshot 2023-02-22 at 10 00 40 AM

Can I keep the source space?

Hello, I am happy to find this project and it works very well. But I found a problem:

When I calls:

HtmlCompat.fromHtml(this, "<strike>    str    ike    </strike>", 0)

The textView shows:

str ike

This is not what I expected. Can I keep all spaces of the source and apply the strike style to them?

Thanks!

image not showing from src tag

Hi Pixplicity, I am using your library to display the text that contains image,text , background of text but the problem is my image is not showing the text colour when I'm using HtmlCompat, any help would be appreciable, thanks.

Colors from span style are not showing

I want to show such HTML string:

<p><span style="color: rgb(230, 0, 0);">should be text color red</span></p><p><br></p><p><br></p><p><span style="background-color: rgb(230, 0, 0);">should be text color red background</span></p>

However it is not formatted and lack of colors. I have just only replace this HTML string in the sample app of this project(replaced the R.raw.example string inside).

HtmlCompat with Picasso

How can I load images from <img> using Picasso?
I can get image url from source attribute and create Drawable instance, but I can't return for method getDrawable

Improve documentation of SpanCallback

from the docs/method name it is not really clear that you have to return the span also if you did not modify/replace it. Normally the name Callback suggests that it is just a notification while this function actually alters the bahavior. Maybe something like SpanHandler would be clearer.

Sample images in the library?

Hi,

I was looking through my app APK and noticed a strange 30K sample.png and realized it comes from your library. Is there a reason for it being there and not in the sample project? We have an Instant App which has APKs limited to 4MB so every KB counts.

Thanks!

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.