Hello,
Visual Studio 2013 udpate 3, MVC5, VB.
I'm trying to follow the simple instructions at: http://docs.ckeditor.com/#!/guide/dev_installation, the section on "Adding CKEditor to Your Page".
I first created a standard MVC5 web project and made no changes. I then installed ckeditor-standard (v4.4.7) using NuGet. That package installs a ckeditor folder into the Scripts folder.
I added the following into the <head> section of the _layout.vbhtml partial view:
<script src="ckeditor/ckeditor.js"></script>
I copied the following code from the page linked above into the about.vbhtml view:
<textarea name="editor1" id="editor1" rows="10" cols="80">
This is my textarea to be replaced with CKEditor.
</textarea>
<script>
CKEDITOR.replace('editor1');
</script>
When I click into the about page, I get the following error:
Unhandled exception at line 44, column 3 in http://localhost:46636/Home/About
0x800a1391 - JavaScript runtime error: 'CKEDITOR' is undefined
So I'm not a javascript guru just yet and I really follow instructions exactly as they're given. But I've learned sometimes instructions assume certain basics have been accomplished. I may have missed something basic here.
The steps above are exactly what I did. Can someone help get me started so I can at least take a look at CKEditor in my MVC5 website?
Thanks.
Best Regards,
Alan
My one last look fixed the problem
I tried to follow enumerable blogs/sites to get this running. That coupled with my misunderstanding about how MVC5 registers .js files was the problem. I changed the first line of code above to:
... and the editor worked fine. Sorry for the trouble. I couldn't find a way to delete my post so no one would waste time answering it so I answered it myself. But, how do I delete a post on this forum if I want to withdraw my question?
Best Regards,
Alan