how do I remove Text formatting in TextEditor
Posted: Sat Apr 09, 2022 5:44 am
Hi All,
I have been using the text editor to show text formatted in colour. When I save the text, the colour formatting is saved with it and when I load the text back, the formatting is returned as well. However for my purposes colour is just for ease of reading and editing but causes problems with processing the text. Is there a way to remove the formatting code from the text so I can save it without any formatting at all.
I have tried to find the colour format code ( \33P[ff4529] ) using find and replace but it does not find anything, when I look at the text in a hex dump the code is represented as .P[ff4529] can't find that in the text either.
In the TextEditor example in RapaGUI you can change Bold, Italic and Underline but there is nothing to return the code back to normal.
Can anyone set me in the right direction or show me some code that will remove all formatting from the text.
Cheers
Leo
I have been using the text editor to show text formatted in colour. When I save the text, the colour formatting is saved with it and when I load the text back, the formatting is returned as well. However for my purposes colour is just for ease of reading and editing but causes problems with processing the text. Is there a way to remove the formatting code from the text so I can save it without any formatting at all.
I have tried to find the colour format code ( \33P[ff4529] ) using find and replace but it does not find anything, when I look at the text in a hex dump the code is represented as .P[ff4529] can't find that in the text either.
In the TextEditor example in RapaGUI you can change Bold, Italic and Underline but there is nothing to return the code back to normal.
Can anyone set me in the right direction or show me some code that will remove all formatting from the text.
Cheers
Leo