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

RichTextBox: Inserting an inline image goes partially on top of the previous line

2 Answers 14 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Tinja
Top achievements
Rank 1
Tinja asked on 08 Feb 2016, 08:12 AM

Hi!

I'm trying to add an inline image to a RadRichTextBox by dragging and dropping the image from elsewhere in my application. I noticed that sometimes the image goes partially on top of the previous line as shown in the attached picture. Even when changing the wrapping style between square and top-and-bottom, it doesn't get fixed. 

I wonder what's causing this? Is there a way to work around this? Could it be just my Visual Studio?

Thanks!

Tinja

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Boby
Telerik team
answered on 10 Feb 2016, 01:15 PM
Hello Tinja,

I have answered this question in the support ticket you opened due to the more specific information provided there. Basically the problem was that an ImageInline instance was constructed with empty size (Size()) instead of with the correct dimensions.

Regards,
Boby
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Tinja
Top achievements
Rank 1
answered on 11 Feb 2016, 07:58 AM

Hi!

To leave the result for other people who might face this problem, I'm going to reply to this thread. 

The issue was in pasted text, where the line spacing type was "Exact".

To solve this I created an event handler to handle the PasteCommand where I iterate through all the paragraphs and set the line spacing type to "Auto" and line spacing to 1.5.

Huge thanks to Boby for identifying the problem and helping with this issue!

 

Tinja

Tags
RichTextBox
Asked by
Tinja
Top achievements
Rank 1
Answers by
Boby
Telerik team
Tinja
Top achievements
Rank 1
Share this question
or