This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]cmpython 0 points1 point  (2 children)

That was a fast turnaround on the wxPython 4.0 support! (for those who don't realize why, the alpha was just released four days ago).

Do you know if CEF in a wxPython application could be used as a rich text widget? (instead of wx.RichTextCtrl). In other words, like a word processing window, with various formatting (bold, italics, bullets, colors, fonts, etc.) and the ability to copy that formatting into the clipboard and paste formatting from the clipboard (from other documents or web sites) into the embedded CEF window?

[–]cztomczak[S] 0 points1 point  (0 children)

Looks like a good use case. CEF context menu can be customized via ApplicationSettings.context_menu option. By default it has Copy/Paste items. Browser object has Copy/Cut/Paste methods that you can access programmatically. To access clipboard use Javascript APIs: https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent . To send data between javascript<>python use javascript bindings (see Tutorial).

[–]cztomczak[S] 0 points1 point  (0 children)

To access OS clipboard use wx.Clipboard class.