Click here to Skip to main content
15,885,877 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have 3 pages as follows:
Masterpage:
<!DOCTYPE html>
<html>
<head>
<title>@ViewBag.Title</title>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script type="text/javascript">

$(document).ready(function () {
$(".ac").click(function () {
$(".w").show("fast");
$(".content").load("/Ag/Khoitao");
});
$(".bc").click(function () {
$(".w").hide("fast");
$(".content").empty();
});
});
</script>
</head>
<body>



@RenderBody()



</body>
</html>

Start page Index:
XML
<style type="text/css" rel="stylesheet">
    .w {
        width: 1024px;
        height: 500px;
        background-color: blue;
        display: none;
        position: absolute;
        z-index: 1000;
        margin-left: auto;
        margin-right: auto;
        top: 50px;
    }
    .w div
    {
         width: 100%;
        float: left;
    }
    .title_ {
        height: 40px;
        background-color: greenyellow;
    }
    .content {
        height: auto;
        background-color: darkorange;
        overflow: scroll;

    }
</style>
<a href="#" class="ac">Open</a>

<div class="w"><div class="title_"><a href="#" class="bc">Close</a></div><div class="content"></div></div>


And KhoiTao page:
@model Using_Editor_In_MVC3.Models.Menu
<script src="/Scripts/ckeditor/ckeditor.js" type="text/javascript"></script>
<script type="text/javascript" src="/Scripts/ckeditor/adapters/jquery.js"></script>
<script type="text/javascript">

CKEDITOR.replace("content");

</script>
@using (Html.BeginForm()) {
@Html.ValidationSummary(true)

Menu


@Html.LabelFor(model => model.Name)


@Html.TextAreaFor(model => model.Name, new { @id = "content" , @class = "ckeditor" })
@Html.ValidationMessageFor(model => model.Name)



<input type="submit" value="Create" />



}


but when I click on the link card Open does not load the CKEditor.
Posted

1 solution

try this:
HTML
<script src="@Url.Content("~/ckeditor/ckeditor.js")" type="text/javascript"></script>

 @Html.TextAreaFor(model => model.Description, new { @class = "ckeditor", @id = "ckeditor" })
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900