Style Spans not applied in editor
See original GitHub issue- Markwon version: 4.3.1
- As per the demo & instructions, I wrote down code to listen for TextChange and apply the markdown style.
- Even though the asterisk char’s color changed, the bold did not get applied.
Here are my dependencies,
implementation "io.noties.markwon:core:$markwon_version"
implementation "io.noties.markwon:editor:$markwon_version"
implementation "io.noties.markwon:ext-strikethrough:$markwon_version"
implementation "io.noties.markwon:ext-tables:$markwon_version"
implementation "io.noties.markwon:ext-tasklist:$markwon_version"
implementation "io.noties.markwon:html:$markwon_version"
implementation "io.noties.markwon:image:$markwon_version"
implementation "io.noties.markwon:image-glide:$markwon_version"
implementation "io.noties.markwon:linkify:$markwon_version"
implementation "io.noties.markwon:simple-ext:$markwon_version"
implementation "io.noties.markwon:inline-parser:$markwon_version"
layout XML,
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/editor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="none"
android:gravity="start|top"
android:inputType="text|textLongMessage|textMultiLine" />
</RelativeLayout>
Am I doing something wrong…
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
CKEditor not correctly apply span tags - Stack Overflow
CKEditor not correctly apply span tags ... I use CKEditor 4 and have this problem: This occurs when the web page opened and...
Read more >Editor - Styles - Apply styles to elment instead of span - Telerik
I've got a Kendo editor with custom CSS styles that I'm importing via a custom style sheet. Is there a way to apply...
Read more >Span HTML – How to Use the Span Tag with CSS
You can use the HTML span tag as a container to group inline elements together so you can style or manipulate them with...
Read more >Applying inline styles with <span> tags with same selection ...
When applying multiple inline styles to the same text, only one span tag should be added with all the inline styles Actual behavior....
Read more >Html Editor adds span tag with line height - Sitefinity
Hey Conrad, I recently ran into that aswell, it's because you have line-height mis-match somewhere in your regular css compared to the selected ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @shivakumars !
This actually is a bug. I’ve looked at it briefly and it seems to be caused by a single new-line in markdown to be treated as a space. Text diffing fails (it considers
) and thus second span receives wrong position. This can be solved with markdown treating soft breaks as new lines. For example:
**\n**
to be replaced with aOf cause this would mean that in display/preview mode this markdown should also treat soft breaks as new lines, otherwise content will be different
Please refer to the documentation of how to additionally add styling whilst editing