Community Discussions and Support
IERenderer adds NEWLINE on PASTE of formatted Text

Hi all,
I have a issue with IERenderer (even as of current 2.7.1.5):
when pasting formatted text (maybe a headline from a PDF or something similiar), an additional NEWLINE is added to the pasted text:


hello world.


hello PASTED CONTENT
world.


"Paste special..." with unformatted text works fine.


any clues?


TIA
Marc


hard to find the right category for IERenderer.
Hopefully I'm not totally wrong here ;-)


PMAIL 4.80de / IERenderer 2.7.1.5 / W10 21H2 ENT LTSC


Hi all, I have a issue with IERenderer (even as of current 2.7.1.5): when pasting formatted text (maybe a headline from a PDF or something similiar), an additional NEWLINE is added to the pasted text: hello world. hello PASTED CONTENT world. "Paste special..." with unformatted text works fine. any clues? TIA Marc hard to find the right category for IERenderer. Hopefully I'm not totally wrong here ;-) PMAIL 4.80de / IERenderer 2.7.1.5 / W10 21H2 ENT LTSC

-- Murphy's Law: "Anything that can go wrong, will go wrong".
   There's also Parkinson's Law – "Work expands to exceed available time".

It's rather difficult to get this right since the final line break might be required for properly keeping the formatting of the pasted text (and the one already there) - which you might want or not want depending on everyone's preferences or the origin of the pasted text: What I've taken care of is that text clipped from within a single line inside the editor will not have a line break attached (unless deliberately included), but as soon as it includes a whole line or an already existing line break there will be one. The same is true for HTML text from external sources: Although you don't see it there's always some hidden space and possible a line break attached after conversion to the Rich Text format which the editor works with, so how's IER supposed to tell whether it should strip it or not when inserting it? There simply isn't a proper way to tell from what's on the clipboard, I can do some more testing, but not make any promises, suggestions welcome: Maybe keeping a blank whould be enough with regard to the formatting (which includes not only fonts but also text color (except for white), BTW).


It's rather difficult to get this right since the final line break might be required for properly keeping the formatting of the pasted text (and the one already there) - which you might want or not want depending on everyone's preferences or the origin of the pasted text: What I've taken care of is that text clipped from within a single line _inside the editor_ will _not_ have a line break attached (unless deliberately included), but as soon as it includes a whole line or an already existing line break there will be one. The same is true for HTML text from external sources: Although you don't see it there's always some hidden space and possible a line break attached after conversion to the Rich Text format which the editor works with, so how's IER supposed to tell whether it should strip it or not when inserting it? There simply isn't a proper way to tell from what's on the clipboard, I can do some more testing, but not make any promises, suggestions welcome: Maybe keeping a blank whould be enough with regard to the formatting (which includes not only fonts but also text color (except for white), BTW).
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

As I already wrote, the (third party) HTML converter always adds the line break if creating the Rich Text for inserting it into the editor, but I think I found a way for removing it in cases where it doesn't appear to be useful to have one: IER will now check whether there is at least a second one any place else, and if so it will not remove the final one so paragraphs will be kept the way they are which should also avoid accidental reformatting. If copying text without including a terminating line break the formatting will be lost, though, there's no way around this, that's how RTF works.


As I already wrote, the (third party) HTML converter always adds the line break if creating the Rich Text for inserting it into the editor, but I think I found a way for removing it in cases where it doesn't appear to be useful to have one: IER will now check whether there is at least a second one any place else, and if so it will not remove the final one so paragraphs will be kept the way they are which should also avoid accidental reformatting. If copying text without including a terminating line break the formatting will be lost, though, there's no way around this, that's how RTF works.
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

Hi Michael,


thank you! :-)


Marc


Hi Michael, thank you! :-) Marc

-- Murphy's Law: "Anything that can go wrong, will go wrong".
   There's also Parkinson's Law – "Work expands to exceed available time".

live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft