Skip to content

Commit d6c8254

Browse files
committed
Handle history when copy/pasting
1 parent 1ebdb68 commit d6c8254

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,9 @@ class AztecText : AppCompatAutoCompleteTextView, TextWatcher, UnknownHtmlSpan.On
10441044
val oldHtml = toPlainHtml()
10451045
val newHtml = oldHtml.replace(Constants.REPLACEMENT_MARKER_STRING, textToPaste)
10461046

1047+
history.beforeTextChanged(toFormattedHtml())
10471048
fromHtml(newHtml)
1049+
history.handleHistory(this@AztecText)
10481050

10491051
inlineFormatter.joinStyleSpans(0, length())
10501052
}

0 commit comments

Comments
 (0)