Coder Social home page Coder Social logo

gunio / markdownview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from falnatsheh/markdownview

38.0 4.0 5.0 122 KB

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

markdownview's Introduction

What is it?

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.

Demo app Screenshot

This is a Screenshot from the demo app where it shows a markDown text in the upper half of the screen and when you hit update it will reload the text to MarkdownView (lower half of the screen).

MarkdownView screenshot

##How to use it?

  • To add MarkdownView to your project, include the jar, or the source code.
  • Simple usage is to set the whole activity to a MarkdownView by Adding the following to your onCreate method:

MarkdownView markdownView = new MarkdownView(this); setContentView(markdownView);

  • Or you can also add it to your layout by using <us.feras.mdv.MarkdownView android:id="@+id/markdownView" /> and referance it in your activity:

MarkdownView markdownView = (MarkdownView) findViewById(R.id.markdownView);

##Loading MarkDown text or file (local and online):

  • loadMarkdownData(String text) Using this method will result in loading md string to the MarkdownView and displaying it as HTML.

  • loadMarkdownUrl(String url) You can use this method to load local or online files.

To load a locale file, you have to add it to your assets folder and pass a url that start with "file:///android_asset/" : markdownView.loadMarkDownData("file:///android_asset/myFile.md");

To load a file on the web you need to pass the full url :
markdownView.loadMarkDownData("http://www.my-site.com/myFile.md");

License

Licensed under the Apache License, Version 2.0. (The same as the Android project.)

markdownview's People

Contributors

falnatsheh-co avatar

Stargazers

Sogrey avatar cl avatar  avatar zst123 avatar God_X007 avatar 张鸿洋 avatar Aidan Samuel avatar 王根生 avatar Anton Vasilev avatar Huqiu Liao avatar Charles Thomas avatar Fernando Martínez avatar Vladimir Zurita avatar Scotty Laxman avatar Wade avatar Babatunde Adeyemi avatar Oleksandr Skrypnyk avatar Marian C Moldovan avatar Bernard Gatt avatar Tobias Schürg avatar Artem Espolov avatar Jorge (Hezi) Cohen avatar Matrixer avatar Steve Edson avatar Chris Lacy avatar Eric avatar Andy Lin avatar Tamás Barta avatar Stony Wang avatar ZhaoYu avatar Rik Watson avatar gundotio avatar Worajedt Sitthidumrong avatar Issa Fram avatar Ryan Schultz avatar Roman Roan avatar Tristan Bendixen avatar Filipe De Sousa avatar

Watchers

James Cloos avatar gundotio avatar Rik Watson avatar Charles Thomas avatar

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.