Android markdown library (no WebView)
APACHE-2.0 License
Bot releases are visible (Hide)
image
- DefaultDownScalingMediaDecoder
which scales displayed images down (#329)core
- CustomTypefaceSpan
new mergeStyles
functionality and new factory method(#298)Thanks @c-b-h
image-coil
- update Coil
to 0.13.0
(#303)Thanks @ubuntudroid
core
- CustomTypefaceSpan(Typeface)
constructor, use CustomTypefaceSpan.create(Typeface)
CustomTypefaceSpan.create(Typeface, boolean)
factory methods insteadext-tables
- TableAwareMovementMethod
a special movement method to handle clicks inside tables (#289)ext-tasklist
- changed implementation to be in line with GFM (Github flavored markdown),image-glide
- update to 4.11.0
versioninline-parser
- revert parsing index when InlineProcessor
returns null
as resultimage-coil
- update Coil
to 0.12.0
(Coil changelog) (#284)Thanks @magnusvs
core
- MovementMethodPlugin.none()
, MovementMethodPlugin.link()
factory methodscore
- CorePlugin
hasExplicitMovementMethod
configuration method to not add implicit LinkMovementMethod
in afterSetText
core
- MarkwonTheme
isLinkedUnderlined
attribute for links(#270)Thanks to @dallasgutauckis
ext-latex
- JLatexMathTheme.Padding.of(int,int,int,int)
factory methodapp-sample
- example applicationhtml
- SimpleTagHandler
visits children tags if supplied tag is block one (#235)inline-parser
- BangInlineProcessor
properly returns null
if no image node is found (possible to define other inline parsers that use !
as special character)image
- AsyncDrawable
won't trigger loading if it has result (aim: RecyclerView
due to multiple attach/detach events of a View)image
- AsyncDrawable
will resume result if it is Animatable
and was playing before detach event (aim: RecyclerView
) (#241)core
- MarkwonReducer
filter out LinkReferenceDefinition
nodesimage-glide
cache RequestManager
in GlideImagesPlugin#create(Context)
factory method (#259)core
- MovementMethodPlugin.create()
use explicit MovementMethodPlugin.link()
insteadimage
- AsyncDrawable#hasKnownDimentions
(deprecated in 4.2.1
)app
and sample
applications (merged together in a app-sample
single app)TextViewSpan
to obtain TextView
in which markdown is displayed (applied by CorePlugin
)TextLayoutSpan
to obtain Layout
in which markdown is displayed (applied by TablePlugin
, more specifically TableRowSpan
to propagate layout in which cell content is displayed)HtmlEmptyTagReplacement
now is configurable by HtmlPlugin
, iframe
handling (#235)AsyncDrawable
now uses TextView
width without padding instead of width of canvasext-tables
module)enabledBlockTypes
in CorePlugin
jlatexmath-android
dependency (#225)image-coil
module (Coil version 0.10.1
) (#244)Thanks to @tylerbwong
UrlProcessor
to ImageDestinationProcessor
(io.noties.markwon.urlprocessor
-> io.noties.markwon.image.destination
) and limit its usage to process only destination URL of images (was used to also process links before)fallbackToRawInputWhenEmpty
Markwon.Builder
configuration to fallback to raw input if rendered markdown is empty (#242)images
: GifSupport
and SvgSupport
use Class.forName
instead access to full qualified class nameext-table
: fix links in tables (#224)ext-table
: proper borders (equal for all sides)core
: Add PrecomputedFutureTextSetterCompat
Thanks @KirkBushman
MarkwonInlineParserPlugin
in inline-parser
moduleJLatexMathPlugin
now supports inline LaTeX structures via MarkwonInlineParserPlugin
Markwon
whilst configuring)JLatexMathPlugin
: add theme
(to customize both inlines and blocks)JLatexMathPlugin.ErrorHandler
to catch latex rendering errors and (optionally) display error drawable (#204)JLatexMathPlugin
add text color customization (#207)JLatexMathPlugin
will use text color of widget in which it is displayed if color is not set explicitly
SoftBreakAddsNewLinePlugin
plugin (core
module)LinkResolverDef
defaults to https
when a link does not have scheme information (#75)option
abstraction for sample
module allowing switching of multiple cases in runtime via menuAsyncDrawable
when no dimensions are not yet available (#189)linkify
- option to use LinkifyCompat
in LinkifyPlugin
(#201)Thanks to @drakeet
MarkwonVisitor.BlockHandler
and BlockHandlerDef
implementation to control how blocks insert new lines after them// default usage: new blocks parser, no inlines
final Markwon markwon = Markwon.builder(this)
.usePlugin(JLatexMathPlugin.create(textSize))
.build();
// legacy blocks (pre `4.3.0`) parsing, no inlines
final Markwon markwon = Markwon.builder(this)
.usePlugin(JLatexMathPlugin.create(textView.getTextSize(), builder -> builder.blocksLegacy(true)))
.build();
// new blocks parsing and inline parsing
final Markwon markwon = Markwon.builder(this)
.usePlugin(JLatexMathPlugin.create(textView.getTextSize(), builder -> {
// blocksEnabled and blocksLegacy can be omitted
builder
.blocksEnabled(true)
.blocksLegacy(false)
.inlinesEnabled(true);
}))
.build();
subSequence
methodBulletListItemSpan
to position bullet (for bullets to beLeadingMarginSpan
s)MarkwonEditor
to highlight markdown input whilst editing (new module: markwon-editor
)CoilImagesPlugin
image loader based on Coil library (new module: markwon-image-coil
) (#166, #174)Thanks to @tylerbwong
MarkwonInlineParser
to customize inline parsing (new module: markwon-inline-parser
)0.13.0
(and commonmark spec 0.29
)Markwon#configuration
method to expose MarkwonConfiguration
via public APIHeadingSpan#getLevel
getterSvgPictureMediaDecoder
in image
module to deal with SVG without dimensions (#165)LinkSpan#getLink
methodLinkifyPlugin
applies link span that is configured by Markwon
(obtain via span factory)LinkifyPlugin
is thread-safemarkwon-ext-tables
: fix padding between subsequent table blocks (#159)markwon-images
: print a single warning instead full stacktrace in case when SVG or GIFMarkwon
instance thread-safe by using a single MarkwonVisitor
for each render
call (#157)CoreProps.CODE_BLOCK_INFO
with code-block info (language)Markwon.TextSetter
interface to be able to use PrecomputedText/PrecomputedTextCompatPrecomputedTextSetterCompat
and compileOnly
dependency on androidx.core:core
requirePlugin(Class)
and getPlugins
for Markwon
instanceView.post
), so only one invalidationJLatexMathPlugin
formula placeholder (cannot have line breaks) (#149)JLatexMathPlugin
to update resulting formula bounds when fitCanvas=true
andio.noties.markwon
(was ru.noties.markwon
)io.notier.markwon.*
(was ru.noties.markwon.*
)Markwon#builder
does not require explicit CorePlugin
(added automatically),Markwon#builderNoCore()
to obtain a builder without CorePlugin
Priority
abstraction and MarkwonPlugin#priority
(use MarkwonPlugin.Registry
)MarkwonPlugin#configureHtmlRenderer
(for configuration use HtmlPlugin
directly)MarkwonPlugin#configureImages
(for configuration use ImagesPlugin
directly)MarkwonPlugin.Registry
and MarkwonPlugin#configure(Registry)
methodCorePlugin#addOnTextAddedListener
(process raw text added)ImageSizeResolver
signature change (accept AsyncDrawable
)LinkResolver
is now an independent entity (previously part of LinkSpan
)AsyncDrawableScheduler
can now be called multiple times without performance penaltyAsyncDrawable
now exposes its destination, image-size, last known dimensions (canvas, text-size)AsyncDrawableLoader
signature change (accept AsyncDrawable
)LastLineSpacingSpan
MarkwonConfiguration.Builder#asyncDrawableLoader
methodImagesPlugin
removed from core
artifactimages-gif
, images-okhttp
and images-svg
artifacts and their plugins)ImagesPlugin
exposes configuration (adding scheme-handler, media-decoder, etc)ImagesPlugin
allows multiple images with the same source (URL)PlaceholderProvider
and ErrorHandler
to ImagesPlugin
GIF
and SVG
media-decoders are automatically added to ImagesPlugin
if required libraries are found in the classpathImageItem
is now abstract, has 2 implementations: withResult
, withDecodingNeeded
images-glide
, images-picasso
, linkify
, simple-ext
modulesJLatexMathPlugin
is now independent of ImagesPlugin
JLatexMathPlugin
formulas sizes (#138)JLatexMathPlugin
has backgroundProvider
, executorService
configurationHtmlPlugin
is self-contained (all configuration is moved in the plugin itself)AsyncDrawable
exposes ImageSize
, ImageSizeResolver
and last known dimensions (canvas width and text size)AsyncDrawableLoader
load
and cancel
signatures change - both accept an AsyncDrawable
AsyncDrawableLoader
With this release Markwon
3.x.x
version goes into maintenance mode. No new features will be added in 3.x.x
version, development is focused on 4.x.x
version.
AsyncDrawableLoader.Builder#implementation
method (#109 )addFactory
method for MarkwonSpansFactoryrequireFactory
method to MarkwonSpansFactory