- Home
- Forum
- ASP.NET MVC - EJ 2
- How to setup existing asp.net mvc web application for use with DocumentEditor
How to setup existing asp.net mvc web application for use with DocumentEditor
Hello,
Attachment: ViewAndControllers_5ab4d963.zip
I created a new asp.net mvc application using the Syncfusion Essential Studio Sample Creator and chosing the DocumentEditor control with default settings.
I tested the solution, made some adaptions and things worked properly.
Now I wanted to use these features in my existing asp.net mvc web application and followed the instructions at this link to pull in the references and dependencies.
I copied controller actions and views from the Sample Creator solution to my solution and the solution compiled properly.
My special interest is the view 'DocumentEditorFeartures.cshtml' (see attached files) that was created by the Sample Creator where I am facing problems:
- When the view is opened the DocumentEditor layout is displayed properly, but a bunch of errors can be seen in the console of the dev tools
Most errors seem to result from ej2.d.ts or ef2.min.js not recognizing certain objects. - Trying to load a word-file into the editor via the toolbar button causes an error that seems to be related to the code line:
@Html.EJS().DocumentEditorContainer("container").ServiceUrl("/api/DocumentEditorService/").EnableToolbar(true).Render()
where the api/DocumentEditorService/Import action is supposed to be called but an error is caused because it is not found (as inferred from the console error).
Please help.
Kind regards, Manu
Attachment: ViewAndControllers_5ab4d963.zip
SIGN IN To post a reply.
3 Replies
HC
Harini Chellappa
Syncfusion Team
April 10, 2020 08:16 AM UTC
Hi Manu,
Syncfusion Greetings!
Kindly refer the below sample of DocumentEditorContainer in MVC with file importing API in controller. kindly check the sample and let us know whether this helps.
you can also refer CDN links. Kindly refer the below latest version CDN link.
If you face any issues, kindly share a simple sample to reproduce in our end. This will be helpful for us to proceed further on this.
Regards,
Harini C
MM
Manfred Mühlbacher
April 10, 2020 10:18 AM UTC
Hello,
thank you for the help. In the meantime I could resolve the first issue.
But the second one I could not solve yet. I described the problem more exactly in a post with a support ticket.
I will try to solve the problem by using your information and analyzing your sample solution. If I am not able to advance I will contact you again.
Regards, Manu
MM
Manfred Mühlbacher
April 10, 2020 10:43 AM UTC
Hello,
the sample solution helped a lot and now everything is working!
Thank you again.
Regards, Manu
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
MM Manfred Mühlbacher
- Apr 9, 2020 03:44 PM UTC
- Apr 10, 2020 10:43 AM UTC