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

How to get what is attached in editor eg. image, pdf, doc, txt etc....

5 Answers 57 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Rajesh Ramanathan
Top achievements
Rank 1
Rajesh Ramanathan asked on 12 Apr 2010, 05:49 AM
Hi,

How i will know that what is attached in editor content (using image manager and document manager etc....) when i submit all data.

here attachment means Images, Document, etc..........

5 Answers, 1 is accepted

Sort by
0
Rajesh Ramanathan
Top achievements
Rank 1
answered on 12 Apr 2010, 06:06 AM
I want count of each type of doc and full path of doc while submitting editor value.

is there any solution?

Thanks
0
Accepted
Rumen
Telerik team
answered on 12 Apr 2010, 01:48 PM
Hi Rajesh,

The custom modules solution demonstrated in this help article could be helpful for your scenario: Custom Modules.

You can get a reference to the image tags in the content area and get its number using this line of javascript code:

editor.get_document().getElementsByTagName("IMG").length

Best regards,
Rumen
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Rajesh Ramanathan
Top achievements
Rank 1
answered on 13 Apr 2010, 05:23 AM
Hi,

Thanks, for Images but what about other document which i uploaded on editor content. can i get that too?

Thanks,
0
Rajesh Ramanathan
Top achievements
Rank 1
answered on 13 Apr 2010, 07:40 AM
Hi,

I need count and path of images and other doc after clicking on save button. but custom module is calling javascript function after every changes.And if i use ajax to save image path then it won't be good to call ajax for every changes :(
0
Rumen
Telerik team
answered on 13 Apr 2010, 03:04 PM
Hello Rajesh,

The document, pdf files are inserted via the image manager as link tags. You can get a reference to the link tags using

editor.get_document().getElementsByTagName("A")

After that using some regular expression or DOM methods you can check the href of the link whether it contains extensions such as doc, docx, pdf.

As to the newer post: Instead of writing a custom module you can check the images and other files count when submitting the content in the OnClientSubmit event of RadEditor.

All the best,
Rumen
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
Editor
Asked by
Rajesh Ramanathan
Top achievements
Rank 1
Answers by
Rajesh Ramanathan
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or