Jtextpane will lose line breaks when pasting text?

已回答

Hi,

If I paste (CTRL+V) a multi-line text into JTextPane, it always pastes it into a single line replacing any type of EOL to spaces. But If I use the JTextPane outside the intellij framework, everything works as expected.

What should I do? Here are some screenshots.

https://sm.ms/image/jlY4cPXFQtEDSG9

https://sm.ms/image/hIDQuUapSMGszq2

https://sm.ms/image/lKYm7y2Gt3aDTRv

1

Hi,

It's hard to tell what the reason is. I suggest debugging com.intellij.platform.impl.toolkit.IdeClipboard class and implementations of com.intellij.openapi.ide.CopyPasteManager.

0

I'm going to give it a try now
Thank you.

0

请先登录再写评论。