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

[Solved] How to fetch selected image into Insert Image dialog preview area, to show as thumbnail?

3 Answers 62 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ramakrishna
Top achievements
Rank 1
Ramakrishna asked on 02 Jan 2012, 12:19 PM
Hi,

Can anyone please update on how to show the selected image in Telerik Editor onto Insert Image dialog preview area.

My Idea to resolve this is by using the commands like the below placed code at some appropriate places in Telerik Editor files.

var getEditorRange = editor.getRange();

 

var selectedEditortext = getEditorRange.cloneContents().textContent;


Apply "selectedEditortext" in preview area.

Anyone please suggest for any other best practices/ steps.

Thank You.

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 02 Jan 2012, 12:55 PM
Hi,

 I cannot understand what your requirement is. Could you please clarify? A few screenshots may be helpful.

Regards,
Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Ramakrishna
Top achievements
Rank 1
answered on 03 Jan 2012, 08:18 AM
Hi Atanas,

Thank you for the quick reply.

I am enclosing few screenshots for your reference and the details are given below.

In my application, it is required to save the uploaded images in database and display only a single current thumbnail. Currently, I am using 2011.2.712 version of MVC Telerik Editor and customized as per my business requirement.

  1. The user uploads an image.
  2. After upload, the uploaded image is shown in preview area and the user clicks insert button to fetch into Editor.
  3. When user needs to update/replace the image with a new one, the user selects the image in Editor and clicks insert image icon. On this performed action, the selected image should be displayed in Insert Image dialog and the Insert button should be shown as Update.
  4. However, the selected image url is shown in the Web address text field, but the image needs to be displayed in preview area and appropriate Update text should be displayed instead of Insert accordingly.

There is also another issue with respect to selecting the inserted image. We are able to select the inserted image in Editor when the browser is Internet Explorer. But in Google Chrome, we are not able to select the image for resizing or for replacing.

0
Atanas Korchev
Telerik team
answered on 03 Jan 2012, 09:56 AM
Hi,

 The requested behavior is not supported out of the box. The observation about image selection in Google Chrome is right but is due to a limitation of the browser itself - it does not support image selection in edit mode. We cannot do anything to fix that - this should be addressed by Google Chrome HTML editing implementation.

Regards,
Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Editor
Asked by
Ramakrishna
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Ramakrishna
Top achievements
Rank 1
Share this question
or