-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pasted text does not get the applied style #4981
Comments
This worked for me:
then...
|
i wonder if this should be another config options. like useStyleOnPaste? |
what you can get is either segments of pasted style or no style pasted. There are additional methods like cleanStyle that should allow you to eliminate style where possible. |
I just encountered the same issue with my app since I'm trying to keep the styling uniform within each textbox as well. I ended up just overriding
@asturur, would you be okay if I did a PR to add a config option for modifying this behavior as you suggested? |
i thought we did something like that. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Adding this line fixes the issue |
By design, my app does not allow rich text. Meaning that, all text styles are applied to the entire text element by applying .set() on the itext object. However, if user copy/paste some text within the itext, the applied style will not be applied to the pasted text, so I ended up having a textbox with different text styles in it (see snapshot and fiddle).
Version
2.3.0
Test Case
http://jsfiddle.net/Da7SP/1647/
Steps to reproduce
Edit text box. Select a few letters. Hit CTRL+C and CTRL+V to duplicate those letter. Click on button to change the
Expected Behavior
The entire content of textbox must get the applied style.
Actual Behavior
Pasted letter do not get the applied style.
The text was updated successfully, but these errors were encountered: