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

Drag and drop files to RadText Editor in webforms

3 Answers 91 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Chakradhar
Top achievements
Rank 1
Veteran
Iron
Chakradhar asked on 26 Jan 2021, 05:14 AM

Hi, i want to have a similar control like RichText box (winfroms) in Webforms.

I tried using the RadText editor with which i can able to copy paste images and format the text but the problem is unable to drag and drop files (text,word,exce..) to the Text editor.

is there any way i can achieve this in webforms.

 

Thanks 

Chakradhar

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 26 Jan 2021, 11:06 AM

Hi Chakradhar,

You can implement drag and drop over the editor content area in a similar way shown in this RadAsyncUpload demo: Drag and Drop, e.g.

<telerik:RadEditor runat="server" ID="RadEditor1" ContentAreaMode="Div"></telerik:RadEditor>
<telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" ID="RadAsyncUpload1" MultipleFileSelection="Automatic" DropZones=".DropZone1,.reContentArea"  />
<div class="DropZone1">
    <p>Custom Drop Zone</p>
    <p>Drop Files Here</p>
</div>

In this case the editable div content area has a class name of reContentArea so you can set this value to the DropZones property of RadAsyncUpload. 

Another option is to use the Image Manager or the Document Manager which accept file drag and drop too:

Regards,
Rumen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Chakradhar
Top achievements
Rank 1
Veteran
Iron
answered on 29 Jan 2021, 04:20 AM

Hi Rumen,
thanks for the information but im looking for a feature which is similar to MS word document where we can directly drag and drop the files in and can open by double click on the file.

Here in RadTextEditor i want to directly drag and drop the files in content area and open from there by double click on the file

 

0
Rumen
Telerik team
answered on 29 Jan 2021, 07:59 AM

Hi Chakradhar,

Thank you for the nice explanation!

Presently, RadEditor does not offer the required drag and drop functionality of objects and automatic upload, which is more typical for the applications like MS Word and the CMS systems, but not for the UI controls. If you'd like to implement your own approach for your project you can attach to the drop event of the content area and modify the dragged html element/object as per your requirements.

You can find more information at

https://stackoverflow.com/questions/27272787/custom-controlcustom-table-and-drag-it-on-to-radeditor

https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/client-side-programming/methods/attacheventhandler 

Best Regards,
Rumen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Editor
Asked by
Chakradhar
Top achievements
Rank 1
Veteran
Iron
Answers by
Rumen
Telerik team
Chakradhar
Top achievements
Rank 1
Veteran
Iron
Share this question
or