{"id":13645384,"url":"https://github.com/tiagohm/MarkdownView","last_synced_at":"2025-04-21T14:30:52.267Z","repository":{"id":45287217,"uuid":"79276108","full_name":"tiagohm/MarkdownView","owner":"tiagohm","description":"Android library to display markdown text.","archived":true,"fork":false,"pushed_at":"2018-10-09T10:35:11.000Z","size":6521,"stargazers_count":1033,"open_issues_count":24,"forks_count":165,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-09-27T02:40:58.253Z","etag":null,"topics":["android-library","markdown","view"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tiagohm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-17T21:57:41.000Z","updated_at":"2024-09-13T14:07:20.000Z","dependencies_parsed_at":"2022-08-04T02:30:18.842Z","dependency_job_id":null,"html_url":"https://github.com/tiagohm/MarkdownView","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagohm%2FMarkdownView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagohm%2FMarkdownView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagohm%2FMarkdownView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagohm%2FMarkdownView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiagohm","download_url":"https://codeload.github.com/tiagohm/MarkdownView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223868105,"owners_count":17217031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-library","markdown","view"],"created_at":"2024-08-02T01:02:34.325Z","updated_at":"2025-04-21T14:30:52.246Z","avatar_url":"https://github.com/tiagohm.png","language":"Java","readme":"# MarkdownView\n\nAndroid library to display markdown text.\n\nIt uses [Flexmark](https://github.com/vsch/flexmark-java) and some of its extensions.\n\n## Setup\n\nAdd it in your root build.gradle at the end of repositories:\n```gradle\nallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n```\nAdd the dependency:\n```gradle\nimplementation 'com.github.tiagohm.MarkdownView:library:LATEST-VERSION'\n```\n\nLATEST-VERSION is [![](https://jitpack.io/v/tiagohm/MarkdownView.svg)](https://jitpack.io/#tiagohm/MarkdownView)\n\n## Usage\n\n```xml\n\u003cbr.tiagohm.markdownview.MarkdownView\n android:id=\"@+id/markdown_view\"\n app:escapeHtml=\"false\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"match_parent\"/\u003e\n```\n```java\nmMarkdownView = (MarkdownView)findViewById(R.id.markdown_view);\nmMarkdownView.addStyleSheet(new Github());\nmMarkdownView.loadMarkdown(\"**MarkdownView**\");\nmMarkdownView.loadMarkdownFromAsset(\"markdown1.md\");\nmMarkdownView.loadMarkdownFromFile(new File());\nmMarkdownView.loadMarkdownFromUrl(\"url\");\n```\n\n## Using Emojies\n##### Without internet\nAdd the dependency:\n```gradle\nimplementation 'com.github.tiagohm.MarkdownView:emoji:LATEST-VERSION'\n```\n\n## Custom CSS\n\n```java\n//InternalStyleSheet css = new InternalStyleSheet();\nInternalStyleSheet css = new Github();\ncss.addFontFace(\"MyFont\", \"condensed\", \"italic\", \"bold\", \"url('myfont.ttf')\");\ncss.addMedia(\"screen and (min-width: 1281px)\");\ncss.addRule(\"h1\", \"color: orange\");\ncss.endMedia();\ncss.addRule(\"h1\", \"color: green\", \"font-family: MyFont\");\nmMarkdownView.addStyleSheet(css);\n\nmMarkdownView.addStyleSheet(ExternalStyleSheet.fromAsset(\"github.css\", null);\nmMarkdownView.addStyleSheet(ExternalStyleSheet.fromAsset(\"github2.css\", \"screen and (min-width: 1281px)\");\n```\n\n## JavaScript\n```java\nJavaScript js = new ExternalJavaScript(url, async, defer);\nmMarkdownView.addJavascript(js);\n```\n\n## Twitter\n\n#### Embed a Single Tweet\nFrom *https://twitter.com/RealGrumpyCat/status/845101936550469634*\n* `#[tweet](845101936550469634)`\n* `#[tweet-hide-cards](845101936550469634)`\n\n#### Follow Button\nFrom *https://twitter.com/tiag0hm*\n* `#[follow](tiag0hm)`\n\n## Themes\n* GitHub\n\n## Support\n\n- [x] Bold `**Text**` or `__Text__`\n- [x] Italic `*Text*` or `_Text_`\n- [x] Strikethrough `~~Text~~`\n- [x] Horizontal Rules `---`\n- [x] Headings `#`\n- [x] Links `[alt](url)`\n- [x] Images `![alt](url)`\n- [x] Code\n- [x] Blockquote\n- [x] Nested Blockquote\n- [x] Lists\n- [x] Tables\n- [x] TaskList\n- [x] AutoLink\n- [x] Abbreviation\n- [x] Mark `==Text==`\n- [x] Subscript `H~2~O`\n- [x] Superscript `10^-10^`\n- [x] Keystroke `@ctrl+alt+del@`\n- [x] MathJax Inline `$x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}$`\n- [x] MathJax `$$x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}$$`\n- [x] Footnotes\n- [x] Image Resizing `![alt](url@100px|auto)`\n- [x] Syntax Highlighting (using [Highlight.js](https://highlightjs.org/))\n- [x] Emoji ([EmojiOne v2](http://emojione.com)) `:smile:`\n- [x] Custom CSS\n- [x] Youtube `@[youtube](fM-J08X6l_Q)`\n- [x] Twitter\n- [x] JavaScripts\n- [x] Label `--DEFAULT--` `---SUCCESS---` `----WARNING----` `-----DANGER-----`\n- [x] Bean `{{fieldName}}`\n- [x] Custom Attributes `{ #id .class name=value name='value'}`\n- [x] Text Align, Text Size and Text Colors using Custom Attributes\n\n\u003cimg width='380' src='https://raw.githubusercontent.com/tiagohm/MarkdownView/master/1.png'/\u003e\n\u003cimg width='380' src='https://raw.githubusercontent.com/tiagohm/MarkdownView/master/2.png'/\u003e\n\u003cimg width='380' src='https://raw.githubusercontent.com/tiagohm/MarkdownView/master/3.png'/\u003e\n\u003cimg width='380' src='https://raw.githubusercontent.com/tiagohm/MarkdownView/master/4.png'/\u003e\n\u003cimg width='380' src='https://raw.githubusercontent.com/tiagohm/MarkdownView/master/5.png'/\u003e\n\u003cimg width='380' src='https://raw.githubusercontent.com/tiagohm/MarkdownView/master/6.png'/\u003e\n\u003cimg width='380' src='https://raw.githubusercontent.com/tiagohm/MarkdownView/master/7.png'/\u003e\n\u003cimg width='380' src='https://raw.githubusercontent.com/tiagohm/MarkdownView/master/8.png'/\u003e\n\n## LICENSE\n```\nCopyright 2017-2018 tiagohm\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":["编辑器"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagohm%2FMarkdownView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiagohm%2FMarkdownView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagohm%2FMarkdownView/lists"}