1
Answer

Html.Kendo().Editor()

Soma Debnath

Soma Debnath

1y
260
1

I have used this Kendo editor but when i try to copy image with text , only text get copied not images. Please someone can help me on this.I am trying to copy text along with images from word file to Kendo editor but not working.

 

Thank you

Answers (1)
0
Jayraj Chhaya

Jayraj Chhaya

313 6k 93.5k 1y

When copying text along with images from a Word file to a Kendo editor, the issue might be related to how the editor handles image data. To ensure that both text and images are copied correctly, you may need to handle the image data separately during the copy operation. One approach is to extract the image data from the Word file and insert it into the Kendo editor as an image element.

// Extract image data from Word file
byte[] imageData = GetImageDataFromWordFile("path/to/word/file.docx");

// Insert image into Kendo editor
string imageHtml = $"<img src='data:image/png;base64,{Convert.ToBase64String(imageData)}'>";
kendoEditor.InsertHtml(imageHtml);

By extracting the image data and inserting it as an image element with the appropriate base64 encoding, you can ensure that both text and images are copied correctly into the Kendo editor.