Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome: After removed formatted text, new typed text has the same styles

When I remove all content from contenteditable field, and then start typing new text wrapped into the same tag as deleted text despite that in debugger there are no relevant elements.

Examples:

enter image description here enter image description here

Expectable behavior is following (got in Firefox):

enter image description here

Could somebody help me to solve this issue?

P.S. If any extra information is needed please let me know.

like image 650
nowiko Avatar asked May 19 '17 11:05

nowiko


1 Answers

Try pasting text from the font size you normally would want. This will change the font size for you. If you want to choose the font size for the entire contenteditable field, try adding that to your CSS.

like image 121
Benjamin Hollon Avatar answered Nov 09 '22 10:11

Benjamin Hollon