Copy & Paste Bug: Spaces get transformed to <nbsp>

Started by knn, July 30, 2010, 01:30:22 PM

Previous topic - Next topic

knn

When I mark some text and then paste it into a html editor (Frontpage, Wordpress etc) then all <spaces> got converted to <nbsp;> and thus a whole pasted text would turn into a nobreak-line.

alex

This is not the bug. It is by design. Otherwise browser will merge all spaces and eat indent. As far as I remember. 
HippoEDIT provides different clipboard formats by request. If application wants HTML - it gets HTML (syntax highlighted), if RTF -> RTF (syntax highlighted), if Plain text -> text without syntax highlighting and with normal spaces.
If your paste it in design mode, this is as it should be. If you paste it in source view mode, this is a bug of the html editor, because they need to request text but not html.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

knn

Sorry, when I paste text from a TEXT EDITOR then unformatted text should be pasted.

There is absolutely no reason to convert all spaces " " to &nbsp;. There is no sense in it.

This is definitely a major no-no and renders HippoEdit useless for me.

alex

Sorry, I think you are not aware about different clipboard formats.
Try to paste text from HippoEDIT to Windows Notepad. If you will get <nbsp;> pasted, I will change it.

Nobody force you to use HE. Use that editor you like. And I am as author, will do what I think is right. You can try to convince me, but decision will be done on my side.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

knn

Quote from: alex on July 30, 2010, 10:13:23 PM
Sorry, I think you are not aware about different clipboard formats.
Try to paste text from HippoEDIT to Windows Notepad. If you will get <nbsp;> pasted, I will change it.

Nobody force you to use HE. Use that editor you like. And I am as author, will do what I think is right. You can try to convince me, but decision will be done on my side.

Can you tell me 1 other TEXTeditor that inserts converted text (text --> html) when I paste?
Such a conversion is unheard of. One of the _MAIN_ reasons to use text editors is that there is no formatting, just the pure text-chars.

But what you implemented is triple-bad:
1) Pasting becomes unreliable since what you copied is not what you pasted
2) Pasted text gets converted into something that makes no sense (space is not equivalent to nobreak-space. If you want to introduce nobreaks then correct approach would rather be to surround by <nobr> tags)
3) And SOMETIMES HippoEdit does INDEED paste only the text without any conversions.

So if you want to keep this WYSIWYG behavior then please make it optional (e.g. right-click -> "rich copy"). Sorry, but this is a killer bug for me. It would be a pity if Hippoedit (= maybe the best texteditor out there) would become grossly unusable because of this.

alex

Sorry once more. But probably you really do not understand. I have also provided an example with Windows Notepad, but you have not taken it into account.

HippoEDIT provides that format which target application requests.
If FrontPage or what ever will request TEXT it will get plain text, without any formating as you have in HippoEDIT.
But it request HTML clipboard format and gets it.
So if you complain about passed HTML text, this is not to HippoEDIT but to other App. On HippoEDIT side everything is correct.

Just want to clarify why at all necessary to support these clipboard formats (HTML and RTF) for text editor with syntax highlighting.
This is only a way to transparently pass syntax highlighting information to another application to allow them display this text WYSIWYG. For example to paste syntax highlighted source code into mail with MS Outlook or into Word document for spec etc.

HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

knn

Quote from: alex on August 01, 2010, 10:16:58 PM
Sorry once more. But probably you really do not understand. I have also provided an example with Windows Notepad, but you have not taken it into account.

HippoEDIT provides that format which target application requests.
If FrontPage or what ever will request TEXT it will get plain text, without any formating as you have in HippoEDIT.
But it request HTML clipboard format and gets it.
So if you complain about passed HTML text, this is not to HippoEDIT but to other App. On HippoEDIT side everything is correct.

I fully understand. Hippoedit does what it is programmed to do.

The problem is that Hippoedit is a text editor and thus should deal with text not with WYSIWYG.

If you want Hippoedit to copy formatted text then please do so but make it OPTIONAL (e.g. rightclick->rich copy).

As it stands now Hippoedit is nearly utterly useless for me. As it stands now I am forced to copy&paste SIMPLE TEXT from HippoEdit to some third party text editor and then copy&paste it from this other editor to the WYSIWYG editor just because of the nonsense conversion of <space> to &nbsp;

Sorry, but what you demand is to

  • switch into "Text Mode" of, letsay, the WordPress-Editor (or FrontPage Editor)
  • wait until Wordpress reloads the page in TextMode
  • let WordPress possibly mess around with HTML code
  • make me scroll down to the place where I want to paste the text
  • wait until WordPress (or Frontpage) switches back to WYSIWYG mode again
  • make me scroll down to the place where I need to continue editing

just for the extreme rare case that someone wants to keep HippoEdit syntax hilighting.

I doubt it that you will find any other text editor doing this ridiculous conversion.

It's completely IRRELEVANT what the receiving WYSIWYG editor (e.g. Frontpage or Wordpress) requests: A WYSIWYG editor will ALWAYS accept WYSIWYG-marked clipboard content (except in special modes).

Look, I am a programmer myself and as far as I am concerned HippoEdit is a masterpiece of coding (and especially since it came so suddenly out of nowhere) and I admit that having this clipboard-format-on-demand feature adds to HippoEdit's huge arsenal. But at the end of the day HippoEdit is a text editor thus it should default like one. So please reconsider.

alex

QuoteI doubt it that you will find any other text editor doing this ridiculous conversion.
Microsoft Visual Studio.

QuoteSorry, but what you demand is to
switch into "Text Mode" of, letsay, the WordPress-Editor (or FrontPage Editor)
wait until Wordpress reloads the page in TextMode
let WordPress possibly mess around with HTML code
make me scroll down to the place where I want to paste the text
wait until WordPress (or Frontpage) switches back to WYSIWYG mode again
make me scroll down to the place where I need to continue editing
So, all programs work correctly. But you not:
- You actually paste in the FrontPage or WordPress-editor in WYSIWIG mode
- This is a reason why other app request from HE HTML format. Because you are in WYSIWIG mode, they request WYSIWIG text
- HE does not copy something to clipboard, it only informed other apps which clipboard formats it supports
- Other app selects that format, from within proposed by HE, which it likes more and picks it up

So, you have a way to get text in plain mode, if you process in designed way, but you complain that it is too much movements for you.

Ok. At the end. This is not a bug. I can accept it as a dev request and maybe will add the xml flag to disable HTML Clipboard format.
But only in 1.50 or later and only after all other features. If you want to have this feature earlier you can pay for custom development request.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

AH, now i get it. HippoEDIT can not only get several formats from clipboard
but also provides several formats to the clipboard. HEUREKA, i was not aware of this.

HippoEDIT can choose which format to paste from clipboard, i guess other apps are able to do the same.
I see this e.g. in WORDTM and Lotus NotesTM f.ex., there are menu commands to do so.
At default such apps take from clipboard what is the default for that app.



Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

knn

Quote from: Stefan on August 10, 2010, 08:52:53 PM
AH, now i get it. HippoEDIT can not only get several formats from clipboard
but also provides several formats to the clipboard.
Exactly.

Thus in practice HippoEdit will ALWAYS paste WYSIWYG texts into WYSIWYG-editors (e.g. Word, Wordpress, Frontpage) since all WYSIWYG-editors accept WYSIWYG text.

Thus in practice I need a third party text editor to get rid of WYSIWYG formatting (= formatting that HippoEdit itself inserted into the text).