-
Type:
Bug
-
Status: Closed
-
Priority:
P4
-
Resolution: Duplicate
-
Affects Version/s: 6u2
-
Fix Version/s: 6
-
Component/s: client-libs
-
Labels:
-
Subcomponent:
-
CPU:x86
-
OS:windows_xp
If I paste a formated text in an editable JTextPane or JEditorPane then it will insert an additional paragraph before and after the inserted line.
To reproduce:
- copy some of the text in TextPane (Ctrl-C).
- paste the text (Ctrl-V).
- observer 2 additional paragraphs above the pasted text.
---------- BEGIN SOURCE ----------
import javax.swing.*;
public class TestCopyAndPaste {
public static void main( String[] args ) {
JFrame frame = new JFrame();
JTextPane text = new JTextPane();
text.setContentType( "text/html" );
text.setText( "<p> normal Text <font color='red'>red Text</font> <b>bold text</b>" );
frame.add( text );
frame.pack();
frame.show();
}
}
---------- END SOURCE ----------
To reproduce:
- copy some of the text in TextPane (Ctrl-C).
- paste the text (Ctrl-V).
- observer 2 additional paragraphs above the pasted text.
---------- BEGIN SOURCE ----------
import javax.swing.*;
public class TestCopyAndPaste {
public static void main( String[] args ) {
JFrame frame = new JFrame();
JTextPane text = new JTextPane();
text.setContentType( "text/html" );
text.setText( "<p> normal Text <font color='red'>red Text</font> <b>bold text</b>" );
frame.add( text );
frame.pack();
frame.show();
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-6723267 Newline inserted during Cut and Paste to HTMLEditorKit
-
- Closed
-