Commit 5eb8b20 1 parent 8e36a88 commit 5eb8b20 Copy full SHA for 5eb8b20
File tree 2 files changed +4
-12
lines changed
editor/src/main/java/com/canopas/editor/ui
2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -178,18 +178,10 @@ class QuillTextManager(quillSpan: QuillSpan) {
178
178
)
179
179
}
180
180
181
- if (currentSpan != null ) {
182
- if (
183
- currentSpan.style.contains(TextSpanStyle .BulletStyle ) &&
184
- editable[selection.min - 1 ] == ' \n ' &&
185
- editable[selection.min - 2 ] != ' \n '
186
- ) {
181
+ if (currentSpan != null && this .selection.collapsed) {
182
+ if (editable[selection.min - 1 ] == ' \n ' && editable[selection.min - 2 ] != ' \n ' ) {
187
183
addStyle(TextSpanStyle .BulletStyle )
188
- } else if (
189
- currentSpan.style.contains(TextSpanStyle .BulletStyle ) &&
190
- editable[selection.min - 1 ] == ' \n ' &&
191
- editable[selection.min - 2 ] == ' \n '
192
- ) {
184
+ } else if (editable[selection.min - 1 ] == ' \n ' && editable[selection.min - 2 ] == ' \n ' ) {
193
185
removeStyle(TextSpanStyle .BulletStyle )
194
186
} else {
195
187
this .currentStyles.addAll(currentStyles)
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ sealed interface TextSpanStyle {
99
99
100
100
object H2Style : TextSpanStyle {
101
101
override val key: String
102
- get() = " h3 "
102
+ get() = " h2 "
103
103
override val style: Any
104
104
get() = RelativeSizeSpan (1.4f )
105
105
You can’t perform that action at this time.
0 commit comments