Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Marktext | 39,687 | a month ago | 1 | January 17, 2022 | 1,033 | mit | JavaScript | |||
📝A simple and elegant markdown editor, available for Linux, macOS and Windows. | ||||||||||
Relaxed | 11,724 | 9 months ago | 50 | isc | JavaScript | |||||
Create PDF documents using web technologies | ||||||||||
Pandoc Latex Template | 5,095 | a month ago | 88 | bsd-3-clause | TeX | |||||
A pandoc LaTeX template to convert markdown files to PDF or LaTeX. | ||||||||||
Bookdown | 3,375 | 563 | 137 | 10 days ago | 29 | September 12, 2022 | 205 | gpl-3.0 | JavaScript | |
Authoring Books and Technical Documents with R Markdown | ||||||||||
Pine | 3,074 | 6 months ago | 45 | other | Swift | |||||
A modern, native macOS markdown editor | ||||||||||
Oscp Exam Report Template Markdown | 2,799 | 2 months ago | 2 | mit | Ruby | |||||
:orange_book: Markdown Templates for Offensive Security OSCP, OSWE, OSCE, OSEE, OSWP exam report | ||||||||||
Yosoro | 2,665 | 9 months ago | 82 | gpl-3.0 | JavaScript | |||||
:shaved_ice:Beautiful Markdown NoteBook. 🏖 | ||||||||||
Awesome Resume For Chinese | 2,405 | 4 months ago | ||||||||
:page_facing_up: 适合中文的简历模板收集(LaTeX,HTML/JS and so on)由 @hoochanlon 维护 | ||||||||||
Texme | 2,138 | 4 months ago | 12 | February 02, 2022 | 2 | mit | JavaScript | |||
Self-rendering Markdown + LaTeX documents | ||||||||||
Freeplane | 1,572 | 5 hours ago | 183 | gpl-2.0 | Java | |||||
Application for Mind Mapping, Knowledge Management, Project Management. Develop, organize and communicate your ideas and knowledge in the most effective way. |
⚠️ This project is deprecated (2023-04-18) ⚠️
external contributors. Feel free to fork this project. If a fork takes off, message us on our
Unfortunately, we were unable to findand we can look at adding a link to the new project in this README.
iOS Text View (UIView
) that Properly Displays LaTeX, HTML, Markdown, and YouTube/Vimeo Links
Simply add the following to your Podfile:
pod 'RichTextView'
And run pod install
in your repo.
Simply add the following to your Cartfile:
github "tophat/RichTextView"
And run carthage update --platform iOS
in your repo.
You can instantiate a RichTextView
by importing the project first:
import RichTextView
To init a RichTextView
:
let richTextView = RichTextView(
input: "Test",
latexParser: LatexParser(),
font: UIFont.systemFont(ofSize: UIFont.systemFontSize),
textColor: UIColor.black,
isSelectable: true,
isEditable: false,
latexTextBaselineOffset: 0,
interactiveTextColor: UIColor.blue,
textViewDelegate: nil,
frame: CGRect.zero,
completion: nil
)
You can also update an existing RichTextView
as follows:
richTextView.update(
input: "Test",
latexParser: LatexParser(),
font: UIFont.systemFont(ofSize: UIFont.systemFontSize),
textColor: UIColor.black,
latexTextBaselineOffset: 0,
interactiveTextColor: UIColor.blue,
completion: nil
)
The parameters are defined as follows:
input
- The string you want to renderlatexParser
- You can pass your own class that conforms to LatexParserProtocol
if you want to handle LaTeX parsing in a custom way. Currently we use the iosMath
Pod to handle LaTeX parsing by defaultfont
- The font of the text to rendertexColor
- The color of the text to renderisSelectable
- A property that determines whether or not RichTextView
is selectableisEditable
- A property that determines whether or not RichTextView
is editablelatexTextBaselineOffset
- The baseline offset of the attributed text attachment that represents any LaTeX text that needs to be renderedinteractiveTextColor
- The text color of any interactive elements/custom links (see Interactive element in Formatting the input
)textViewDelegate
- A RichTextViewDelegate
- conforms to UITextViewDelegate
and also has handling when interactive elements/custom links are tappedframe
- A CGRect
that represents the frame of the RichTextView
completion
- A completion block to handle any errors that might be returned. The input will still render even if there are errors, however it might look differently than expected.In order for the RichTextView
to handle the various use cases it might encounter, the input string needs to be formatted as follows:
[math]
and [/math]
tags. Example: [math]x^n[/math]
[code]
and [/code]
tags. Example: [code]print('Hello World')[/code]
youtube[dQw4w9WgXcQ]
. The YouTube ID of any video can be found by looking at the URL of the video (Example: https://www.youtube.com/watch?v=dQw4w9WgXcQ
) and taking the value right after the v=
URL parameter. In this case the ID of the YouTube video is dQw4w9WgXcQ
vimeo[100708006]
. The Vimeo ID of any video can be found by looking at the URL of the video (Example: https://vimeo.com/100708006
) and taking the value right after the first /
. In this case the ID of the Vimeo video is 100708006
[interactive-element id=<id>]
and [/interactive-element]
tags. By doing this, when a user taps this text it will call the didTapCustomLink
function of RichTextViewDelegate
with the ID of the text that represents the interactive element (<id>
), so be sure to hook into RichTextViewDelegate
to capture this.
Check out the sample project in the Example
root folder to see the screenshots above in action!
Simply clone the repo, run pod install
and you should be good to go
If you want to visually devQA your changes you can navigate to the Example project (found in the root Example
folder), run pod install
and then build and run the app. This will show you some common usages of the RichTextView
.
The example project points to the local copy of the RichTextView
pod, so any changes made locally will be reflected in the sample project.
However, you need to be on the legacy build system to see your changes reflected. There is a known issue with caching development Pods and XCode 10.
Feel free to add additional input/output examples to the example project, especially if you add any new functionality.
Also, be sure to run the unit/UI tests locally as part of the devQA process.
Thanks goes to these wonderful people (emoji key):
Ahmed Elkady |
Orla Mitchell |
Jake Bolam |
Sanchit Gera |
---|---|---|---|
Monica Moore |
Brandon Baksh |
Siavash Bidgoly |
Stephen Truong |
Thanks to Carol Skelly for donating the Github organization and Kevin Zhow for donating the Pod name!