Only tested with editor - other gadgets are probably affected as well.
If you set an editor gadget's font to bold and paste some non-bolded text into it, the text does not get converted to bold, but stays normal or italic (or whatever it was).
Opinions?
hmmm - bug or not?
hmmm - bug or not?
PB 5.73 on Windows 10 & OS X High Sierra
Re: hmmm - bug or not?
The text you insert has the formatting of the text you copied. A normal behavior for the EditorGadget.
sorry for my bad english
Re: hmmm - bug or not?
It's a behavior I see in Microsoft products. It can be annoying, but I can see why the behavior is as it is.
It's annoying when, for example, you try to copy something from a web page into a Word document. Now your Word document is full of crap, javascript, css, or whatever was formatting the text you copied. In Word, what you do is Paste Special, Text Only. If I'm working in an application that doesn't have that feature, like Outlook, I paste what I copied from the web page into Notepad. That strips all the crap out of it, and then I can copy and paste that into wherever.
But the behavior makes sense. Formatting belongs to the text it formats, I guess.
It's annoying when, for example, you try to copy something from a web page into a Word document. Now your Word document is full of crap, javascript, css, or whatever was formatting the text you copied. In Word, what you do is Paste Special, Text Only. If I'm working in an application that doesn't have that feature, like Outlook, I paste what I copied from the web page into Notepad. That strips all the crap out of it, and then I can copy and paste that into wherever.
But the behavior makes sense. Formatting belongs to the text it formats, I guess.
Re: hmmm - bug or not?
I seem to remember that there are APIs that can set gadget to use text or RTF formats...
my pb for chinese:
http://ataorj.ys168.com
http://ataorj.ys168.com
Re: hmmm - bug or not?
For Windows RASHAD has already demonstrated here how to paste RTF text or plain text into the EditorGadget.
Re: hmmm - bug or not?
This is a feature. To paste without formatting, use [Ctrl+Shift+V].
And/or code that into your app's.
And/or code that into your app's.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: hmmm - bug or not?
on my PC, WinXP x86
[Ctrl+Shift+V]=[Ctrl+V].
[Ctrl+Shift+V]=[Ctrl+V].
my pb for chinese:
http://ataorj.ys168.com
http://ataorj.ys168.com
Re: hmmm - bug or not?
I've used this method in my IDE 'Tools' menu for a couple of years, and it works well on Win 10 x64 machine.
viewtopic.php?p=484177#p484177
viewtopic.php?p=484177#p484177
- It was too lonely at the top.
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
Re: hmmm - bug or not?
Adds a button (Paste) or personal keyboard shortcut and uses SetGadgetText(#Gadget, GetClipboardText()) instead of CTRL+V The original (pasted) format will be deleted and will take the format defined by the gadget. This also removes all RTF formatting.kpeters58 wrote:If you set an editor gadget's font to bold and paste some non-bolded text into it, the text does not get converted to bold, but stays normal or italic (or whatever it was).
or remove format after paste
Code: Select all
Procedure Drop_Format()
SetClipboardText(GetGadgetText(#Gadget))
SetGadgetText(#Gadget, GetClipboardText())
ClearClipboard()
EndProcedure
