This is a migrated thread and some comments may be shown as answers.

Import Byte[] document from MVC editor to WPF RadRichTextBoxRichText

2 Answers 70 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Cristiano
Top achievements
Rank 1
Cristiano asked on 16 Apr 2015, 12:41 AM
Greetings.

I had some sort of problems trying to attach my tests so I upload them to wetransfer so you can download them.
On the following link, you will find 2 projects: a WPF and MVC one.   http://bit.ly/1zigHWP


The point is to load and export documents between WPF RadRichTextBoxRichText and MVC Editor.
This is what simulate our enterprise softwares.

 

In the WPF test app, we have a file test.txt with a hexadecimal code of a document created in our WPF application's RadRichTextBoxRichText. 
If you click on the button "Import" you can see the original formatations. Then, if you click the button "Export" you will convert that doc to hexadecimal and copy it to the clipboard so you can past on the MVC test app.

 

In the MVC test app, you can past that hexadecimal code clicking on "Past Hex" button, and you will see that the document was imported well succeded with all formatations.

I guess the main problem begin in the WEB app. 

First problem:
If I export the document to hexadecimal from the MVC editor, clicking on " Get Hex" button, and copy that again using the button "Past Hex", you will realise that you lost all the spaces between lines.

Second problem:
To replicate the following problem, please, follow these steps:
1 - Click "Import From test.txt"
2 - Edit the line where it begins with  "No estudo efectuado não..." , delete the rest of that line leaving just that words, and apply a background color to them.
3 - Justify that words.
4 - Click "Get Hex" and copy the hex code written on the footer.
5 - Replace the hexadecimal code in test.txt in WPF application with the copied hexadecimal.
6 - Run the WPF app and click "Import"

Now, if you look, you can see that:
       The justified line is with extra spaces, 
       All the spaces between lines have been lost, 
       There is no background color on the justified line.



I apreciate the solution for these problems so that we can find a better way to import the documents in both technologies without any lost.
Regards.

2 Answers, 1 is accepted

Sort by
0
Cristiano
Top achievements
Rank 1
answered on 16 Apr 2015, 09:02 AM
Greetings, 
My apologies, I apreciate that you check this link instead of the last one I sent you.

http://we.tl/HWuZj9Ojwj
0
Alexander Popov
Telerik team
answered on 20 Apr 2015, 07:49 AM
Hello Cristiano,

The first issue you reported is caused by what the server returns. Basically, the Editor widget will render exactly what you have passed to its value method. You can try pasting the result in a new HTML file and see the same results as in the Editor. This also suggests that the second issue has the same origins.

Regards,
Alexander Popov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Editor
Asked by
Cristiano
Top achievements
Rank 1
Answers by
Cristiano
Top achievements
Rank 1
Alexander Popov
Telerik team
Share this question
or