I am trying to integrate ckfinder with ckeditor in MVC Project.
Both CKfinder and CkEditor Unzip folders copied into Solution Root.
CkEditor works fine. but CkFinder connector gives error when try to click on Browse Server button.
Urls script like this
<script type="text/javascript">
var editor = CKEDITOR.replace('editor1', {
filebrowserBrowseUrl: '/ckfinder/ckfinder.html',
filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?type=Images',
filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?type=Flash',
filebrowserUploadUrl: '/ckfinder/connector?command=QuickUpload&type=Files',
filebrowserImageUploadUrl: '/ckfinder/connector?command=QuickUpload&type=Images',
filebrowserFlashUploadUrl: '/ckfinder/connector?command=QuickUpload&type=Flash'
});
CKFinder.setupCKEditor(editor, '/ckfinder/');
</script>
Can anybody share an easy integration method of ckfinder in MVC?
I also tried to follow all such tutorials
https://ckeditor.com/docs/ckfinder/ckfinder3-net/integration.html
but have no luck
Related
I am trying to make only static files accessible which are in the wwwroot subfolder of my .NET 4.x project, following the accepted answer from Map to wwwroot in ASP.Net 4?
This means that the MVC script Scripts/LoginPage/app.js will no longer be accessible at all, while wwwroot/Scripts/LoginPage/app.js will be accessible through http://localhost:8080/Scripts/LoginPage/app.js.
However, the project has MVC pages with Bundles, and I am now trying to configure the bundles correctly. The old bundle config is like this:
bundles.Add(
new ScriptBundle("~/Bundles/Scripts/loginpages/index").Include(
"~/Scripts/LoginPage/application.js",
"~/Scripts/LoginPage/index.js"));
The MVC page is rendering the bundle like this:
#Scripts.Render("~/Bundles/Scripts/loginpages/index")
If I just keep everything as is, the page contains the unbundled scripts as follows:
<script src="/Scripts/LoginPage/application.js"></script>
<script src="/Scripts/LoginPage/index.js"></script>
but the files themselves are not accessible.
If I move the scripts but keep the bundle config unchanged, scripts are not included in the HTML at all.
If I move the scripts into the wwwroot subfolder, and change my bundles to reference the scripts in that subfolder:
bundles.Add(
new ScriptBundle("~/Bundles/Scripts/loginpages/index").Include(
"~/wwwroot/Scripts/LoginPage/application.js",
"~/wwwroot/Scripts/LoginPage/index.js"));
then in the debug version this yields the following result HTML:
<script src="/wwwroot/Scripts/LoginPage/application.js"></script>
<script src="/wwwroot/Scripts/LoginPage/index.js"></script>
but the content of the wwwroot folder (which includes the unbundled scripts) will be available at /, not /wwwroot/, thus the files are not found.
How can I configure my scripts/bundles correctly?
I have a problem with my Scripts in my Web-Application. I work about an local Website with ASP.net and IIS Express. But the Scripts doesn´t load correctly.
Css and js Files
Code
Error is 404(not found). that mean js url path on your solution not correct.
to solve it:
Drag any JS file from solution explore and drop it into aspx page html. then replace all js files paths exists on the same directory with the new path without name of js file name
I am trying to include angularjs framework into a existing web forms application. But I am not able to access the angular directives from the aspx pages. I am sure there is some part of settings that I am missing. I added the angularjs package using the nuget installer. It created a directory "Scripts" and dumped all the angularjs related files. Can any body help me in putting up the settings correct so that I can make use of angularjs directives on the apsx pages.
Thanks in advance for the help and suggestions.
Include the script:
<script src="angular.js" type="text/javascript"></script>
Add ngApp to the body tag:
<body ng-app="app">
...
</body>
In your script define your module:
<script>
var app = angular.module('app',[]);
</script>
I've got a simple ASP.NET MVC application for CSV file validation. The user enters some characteristics about the file (text box and some checkboxes), then browses to the file they want to upload and hits submit. The entire application works fine on my local machine and also on an internal web server, but does not work when placed in the external hosting environment. Below are the details.
Originally the file contents on my machine were copied out to the server. This means that bundling of the CSS and JS was not enabled. The application page would render just fine and the submit would also work. However, after submitting the file, the application root changes.
I've been checking the application root with the following code places inside the view.
var applicationpath = '#Url.Content("~/")';
The path is correctly output as something like the following when it's rendered for the first time.
var applicationpath = '/folder1/folder2/folder3/appfolder/';
After submitting the file, it changes to.
var applicationpath = '/folder1/folder2/folder3/';
I've checked with the hosting provider and they've got the application set up on "appfolder" and "folder3" is just a directory in IIS and not set up as an application.
The form in the MVC view is set up to post in the following way.
#using (Html.BeginForm("Upload", "Home", FormMethod.Post, new { enctype = "multipart/form-data", id = "wizard" }))
Since the path changes, this obviously messes up any #Url.Action,#Html.ActionLink, and other Razor methods that are supposed to automatically map to the root. The odd thing is that the CSS and JS files continue to be mapped in the rendered output.
After all of that, I decided to try to Publish the application through Visual Studio to a local file folder and then copy the results out to the hosting provider. This enabled bundling for the CSS and JS files. Now when I go to the root of the application, none of the CSS or JS is pulled down. I've tried grabbing the path to the bundled JS or CSS files and putting that in the browser, but I get a 404 error. The rendered output looks like this:
<link href="/folder1/folder2/folder3/appfolder/Content/css?v=J7SZFaeCsOxTbb847HlSpnWlcb1lMDolldSj5wq-hdc1" rel="stylesheet"/>
Needless to say, I'm at a loss. I've asked the hosting provider to tell me what IIS features they have installed and they have. See below.
IIS Features 1
IIS Features 2
The 3rd party was able to give me RDP access to the server. I turns out that they were using URL Rewrite in IIS and some of the rules were interfering with the MVC application. After they disabled the rules for the application folder, everything worked as it should.
I need to have Editor with file upload capability.this question suggest some choices but none of them sounds appropriate.and this one is for Asp.net MVC2 while I'm working with ASP.Net MVC4.
Why dont you use CKEditor, and CKfinder for file upload ? CKFinder is paid, but you could find few free alternatives for Ckfinder.
pdwfilebrowser is free, and works well with TinyMCE or Ckeditor. You could find more free upload plugins for both.
http://sourceforge.net/projects/pdwfilebrowser/