wordpress-mobile / AztecEditor-Android

A reusable native Android rich text editor component.
Mozilla Public License 2.0
675 stars 112 forks source link

Unable to set inline font style at the beginning of new line #847

Open alexandersokol opened 4 years ago

alexandersokol commented 4 years ago

Expected

Inline styles should be applied to the whole line if styles were applied to the beginning of the new line

Observed

Inline styles not applied to the whole line if styles were applied to the beginning of the new line

Reproduced

  1. Begin new line
  2. Apply inline styles underline/bold/italic
  3. Start typing text
  4. Styles are not applied

Tested

Google Pixel on 9.0 with v1.3.30 Aztec version

tadangky commented 4 years ago

I'm got same problem, please help!

tudoaneverfit commented 6 months ago

@alexandersokol I also got this problem And the code block it works

binding.aztecEditor.afterTextChange {
        if (hasNewLine(it)) {
            binding.aztecEditor.setSelectedStyles(arrayListOf(AztecTextFormat))
        }
}