Coder Social home page Coder Social logo

falnatsheh / markdownview Goto Github PK

View Code? Open in Web Editor NEW
1.0K 1.0K 162.0 5.7 MB

MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

License: Other

Java 46.05% CSS 53.95%
android css markdown markdownview

markdownview's People

Contributors

diegorosado avatar falnatsheh avatar falnatsheh-co avatar intrications avatar kevinsawicki avatar nandorrb 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

markdownview's Issues

MathJax Support

I love this library, please add MathJax Support, it will be more usefull

Can MarkdownView provide loadDataWithBaseURL?

I wonder if MarkdownView can provide a constructor like this that one could use to display unicode?

loadDataWithBaseURL()

For example, in WebView one can do:

mywebView.loadDataWithBaseURL(null, "some unicode string", "text/html", "utf-8", null);

I think we would have to replace "text/html" with something else in case of markdown but I'm not sure which...

Errors in rendering multiple lists in a row

Rendering lists works well when they have another text element separating them:
screenshot_2016-11-22-15-12-58

But when they follow each other (e.g. a numerical list followed by an item list), the second one is of the same type of the first, plus some random empty spaces are added.
screenshot_2016-11-22-15-09-15

Is this, as I think, a rendering error? Is there anything I can do to fix this from outside the library?

Thanks

How scale image (without horizontal scrolling)?

My layout xml:

<us.feras.mdv.MarkdownView android:id="@+id/markdownView" android:layout_width="match_parent" android:layout_height="match_parent" />

My code:

`public class MarkdownViewActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.markdown_view_activity);

    MarkdownView markdownViewFeras = (MarkdownView) findViewById(R.id.markdownView_Feras);
    markdownViewFeras.loadMarkdownFile("file:///android_asset/my.md" );
}

}`

OK. It's work.

But has problem only with image. The image is horizontal scrolling. But I need to scale image (without horizontal scrolling). Is it possible?

MarkdownView Background

MarkdownView's background seem to always be white, as opposed to TextView's default transparent. It also ignores any andoird:background definitions in the layout XML.

Large Images takes a long time to load

Hi,

I loaded a MD-File containing big images (6x1MB).
The loading progress is very slow, so the content isn't showing fast enough.

Is there a way to speed it up? e.g loading the images asynchron?

Doesn't render image links properly

Hey,

I gave it the markdown for the readme of this repository
markdownView.loadMarkdownFile("https://raw.githubusercontent.com/falnatsheh/MarkdownView/master/README.md");

And it doesn't render the images in this readme properly.

Below is not rendered.
screen shot 2017-05-30 at 11 11 02 am

Additionally, most of the text in the readme has the link to the icon and there is a lot of starting white space (at least 1 screen).
screen shot 2017-05-30 at 11 07 37 am
screen shot 2017-05-30 at 11 07 49 am
screen shot 2017-05-30 at 11 08 17 am
Thanks.

Displaying an image from Assets

Hi,
I tried adding this line to my markdown text:

![Levels Meter](file:///android_asset/levels.PNG)

It didn't display the image from the assets folder. Is there a way to do it?

How to show Bullet or numbered list

I am not able to see the bullet or number list, how to show using MarkdownView

Also if I try to set text from some string variable it is not rendered in markdown

Strikethrough not working

Markdown strikethrough syntax doesn't render properly unless done in HTML.

~~This doesn't work...~~
<span style="text-decoration: line-through">...But this does</span>

Add installation process to main project page

I tried to use your library through compiling the project and including the jar file into my project, but either ways I was not able to use it.

a) I tried adding the next lines to my settings.gradle
def markdownView = file('../MarkdownView/MarkdownView' )
settings.createProjectDescriptor( rootProjectDescriptor, 'markdown-view', markdownView )
include ':markdown-view'

and to my build.gradle
compile project( ':markdown-view')

The result is that the Android Studio (v.0.8.6) says: Error:Configuration with name 'default' not found.

b) I tried adding the jar file markdownview-1.2.jar into the libs folder but for some reason when I want to use the MarkdownView class that is not in the classpath.

Any suggestion? I think the library looks quite well, but could be really handy if you could add the installation process.

I think the best way to include your project is through the first solution because I everyone can pull the repository and rebuild the project, getting the latest changes.

Bad performance

I was going to simplify one of app pages with this app but it's very slow.

I am using ByteArrayOutputStream to convert my raw markdown file into a string and then use this library (https://github.com/Uncodin/bypass) to set it to a textview and the difference is night and day.

How to make a table?

I've tried

String md = 
          "First Header   | Second Header\n" +
          "-------------  | -------------\n" +
          "*Content Cell* | Content Cell\n" +
          "Content Cell   | Content Cell";

mMarkdownView.loadMarkdown(md);

💥 But it doesn't display a table

What do I wrong? - Please help! :shipit:

Cannot Embed images

This is most likely an error on my part:

I have several local image files linked in an MD file like so:
![AdvDisNeutral1](AdvDisNeutral1.png)

However, they do not show up. What syntax should I use?
This MD file is in the assets folder along with the images embedded in them.

Just a note: text renders perfectly.

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.