File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -832,7 +832,7 @@ bool MCClipboard::CopyAsLiveCodeStyledText(MCDataRef& r_pickled_text) const
832832 }
833833 }
834834
835- // Could not grab as either styled text or RTF. One last try with HTML.. .
835+ // Could not grab as either styled text or RTF. Try with HTML.
836836 MCAutoDataRef t_html;
837837 if (CopyAsData (kMCRawClipboardKnownTypeHTML , &t_html))
838838 {
@@ -845,6 +845,19 @@ bool MCClipboard::CopyAsLiveCodeStyledText(MCDataRef& r_pickled_text) const
845845 }
846846 }
847847
848+ // Finally, try plain text.
849+ MCAutoStringRef t_plain_text;
850+ if (CopyAsText (&t_plain_text))
851+ {
852+ // Convert to LiveCode styled text
853+ MCDataRef t_pickled_text = ConvertTextToStyledText (*t_plain_text);
854+ if (t_pickled_text != NULL )
855+ {
856+ r_pickled_text = t_pickled_text;
857+ return true ;
858+ }
859+ }
860+
848861 // There was nothing on the clipboard that could be converted to LiveCode
849862 // styled text.
850863 return false ;
You can’t perform that action at this time.
0 commit comments