cjwirth / RichEditorView

RichEditorView is a simple, modular, drop-in UIView subclass for Rich Text Editing.
BSD 3-Clause "New" or "Revised" License
1.9k stars 445 forks source link

copy paste font/background color not preserved #156

Open wholeinsoul opened 6 years ago

wholeinsoul commented 6 years ago

I have set the editor background to be black and text to be white.

 [[self.editorView.webView layer] setBackgroundColor:[[UIColor blackColor] CGColor]];
    [self.editorView.webView setOpaque:NO];
    [self.editorView setEditorFontColor:[UIColor whiteColor]];

When I copy paste html content from my gmail/browser which has "black text on white background", the text in the editor is no longer visible as the copied text is black now. Even though the copied content does have background color and font color information.

lldb) po content <font color="#000000" face="sans-serif" size="3"><span style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.301961); -webkit-text-size-adjust: 100%; background-color: rgba(255, 255, 255, 0);">Hello World</span></font>

Any help ?

Thanks.

dijfgowr commented 4 years ago

I have the same issue. Need help! Did you have any workaround to prevent this? @wholeinsoul Thanks.

wholeinsoul commented 4 years ago

I have the same issue. Need help! Did you have any workaround to prevent this? @wholeinsoul Thanks.

Sorry. No. I just stayed with default black text-on-white background.