Trix editor extends paragraph formatting to adjacent paragraphs

251 Views Asked by At

When you try to insert a picture between two paragraphs, and make the second paragraph a quote, the picture also becomes a quote. The video shows that when you press the quote button, the picture becomes smaller, that is, it becomes part of the quote block. At the same time, on the official website, the editor presented on the page works more predictably and correctly. For clarity, I attach a video. JSFiddle Example.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/trix/1.3.1/trix.css" integrity="sha512-CWdvnJD7uGtuypLLe5rLU3eUAkbzBR3Bm1SFPEaRfvXXI2v2H5Y0057EMTzNuGGRIznt8+128QIDQ8RqmHbAdg==" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/trix/1.3.1/trix.js" integrity="sha512-/1nVu72YEESEbcmhE/EvjH/RxTg62EKvYWLG3NdeZibTCuEtW5M4z3aypcvsoZw03FAopi94y04GhuqRU9p+CQ==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/trix/1.3.1/trix-core.js" integrity="sha512-H8CbNdhcOBCt62S6eVGAUSiyNx5OGVEVrYIIVs0iIgurgD1+oTA9THTZ1tqxSE9yw9vzfilg83xgyxD467a28g==" crossorigin="anonymous"></script>

</head>
<body>
    
  <input id="x" type="hidden" name="content">
  <trix-editor input="x"></trix-editor>
  
</body>
</html>

0

There are 0 best solutions below