All Projects → falnatsheh → Markdownview

falnatsheh / Markdownview

Licence: other
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.

Projects that are alternatives of or similar to Markdownview

Distro Delves
YouTube web-series looking at operating systems in an informational & entertaining format.
Stars: ✭ 31 (-96.88%)
Mutual labels:  markdown
React Markdown Preview
React component preview markdown text in web browser. The minimal amount of CSS to replicate the GitHub Markdown style.
Stars: ✭ 34 (-96.58%)
Mutual labels:  markdown
Qlcommonmark
QuickLook generator for beautifully rendering CommonMark documents on macOS
Stars: ✭ 36 (-96.37%)
Mutual labels:  markdown
Termd
Render markdown in the terminal
Stars: ✭ 32 (-96.78%)
Mutual labels:  markdown
Markdownview
Android library to display markdown text.
Stars: ✭ 970 (-2.32%)
Mutual labels:  markdown
Advanced Javascript
Documentation based on John Resig's website on Advanced JavaScript
Stars: ✭ 35 (-96.48%)
Mutual labels:  markdown
Richtextview
iOS Text View (UIView) that Properly Displays LaTeX, HTML, Markdown, and YouTube/Vimeo Links
Stars: ✭ 953 (-4.03%)
Mutual labels:  markdown
Blink Mind React
A mind map library for react that based on immutable.js.
Stars: ✭ 38 (-96.17%)
Mutual labels:  markdown
Wxparse
wxParse-微信小程序富文本解析自定义组件,支持HTML及markdown解析
Stars: ✭ 7,618 (+667.17%)
Mutual labels:  markdown
Ods2md
Convert LibreOffice Calc Spreadsheets (*.ods) into Markdown tables.
Stars: ✭ 35 (-96.48%)
Mutual labels:  markdown
Manuskript
A open-source tool for writers
Stars: ✭ 960 (-3.32%)
Mutual labels:  markdown
Notes
📝 Migrated to(迁移至) https://github.com/Kuangcp/Note 当前仓库已经废弃, 对应的博客网站:
Stars: ✭ 33 (-96.68%)
Mutual labels:  markdown
Text Runner
Test runner for text
Stars: ✭ 35 (-96.48%)
Mutual labels:  markdown
Soffes.blog
Redis + Git backed blog
Stars: ✭ 31 (-96.88%)
Mutual labels:  markdown
Blankup Electron
Markdown editor with clarity +1, as a desktop application.
Stars: ✭ 37 (-96.27%)
Mutual labels:  markdown
Hint
重构到 ---> https://github.com/hustcc/lint-md
Stars: ✭ 30 (-96.98%)
Mutual labels:  markdown
Gotenberg Go Client
Go client for the Gotenberg API
Stars: ✭ 35 (-96.48%)
Mutual labels:  markdown
Recipes
A super minimal recipe website built on Markdown
Stars: ✭ 38 (-96.17%)
Mutual labels:  markdown
Grunt Md2html
Small Grunt MultiTask to convert Markdown files to HTML, supporting Grunt >= 1.0.0
Stars: ✭ 37 (-96.27%)
Mutual labels:  markdown
Tmdlang
Timebase MarkDown Language
Stars: ✭ 35 (-96.48%)
Mutual labels:  markdown

MarkdownView screenshot Download

About

MarkdownView (Markdown For Android) is an Android library that helps you display Markdown text or files (local/remote) as formatted HTML, and style the output using CSS.

The MarkdownView itself extends Android Webview and adds the necessary logic to parse Markdown (using MarkdownJ) and display the output HTML on the view.

Getting started

  • To add MarkdownView to your project, add the following to build.gradle file:
	dependencies { 
	    compile 'us.feras.mdv:markdownview:1.1.0'
	}

Usage

Add MarkdownView to your layout:

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

and reference it in your Activity/Fragment:

MarkdownView markdownView = (MarkdownView) findViewById(R.id.markdownView);
markdownView.loadMarkdown("## Hello Markdown"); 

Note: You could also create the view by code. Below an example of how to set the whole activity to be a MarkdownView by Adding the following to your onCreate method:

  MarkdownView markdownView = new MarkdownView(this);
  setContentView(markdownView);
  markdownView.loadMarkdown("## Hello Markdown"); 

Screenshots

Demo App and Code Sample

The above screenshots taking from the demo app which could be found here. The demo app include code to demonstrate:

  • Loading Local Markdown File.
  • Loading Remote Markdown File.
  • Loading Markdown text.
  • Live Preview sample code (similar to Marked Mac app)
  • Themes

Loading Markdown text or file:

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

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

To load a local file, you have to add it to your assets folder and pass a url that start with "file:///android_asset/" :

markdownView.loadMarkdownFile("file:///android_asset/myFile.md");

To load a remote file you need to pass the full url :

markdownView.loadMarkdownFile("http://www.my-site.com/myFile.md");

Theming

You could apply custom CSS to the MarkdownView. Example:

markdownView.loadMarkdownFile("file:///android_asset/hello.md","file:///android_asset/MyCustomTheme.css");

You could take a look at CSS example here, you could also view them in the sample app.

ChangeLog:

  • MarkdownView 1.1.0:
    • Support Loading Markdown file from assets subfolders (Thanks @echodjb).
  • MarkdownView 1.0.0:
    • Convert to Gradle Project (Avillable now on jCenter).
    • Fix CSS Issue (Thanks @swanson & @echodjb).
    • Update demo app.

License

Apache 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].