Hi,
Disregard my previous issue about saving summernote field. I've fixed it.
Here is the correct codes:
var htmlContent = $("#coverSheet").summernote('code');
testFormData.coverSheet = htmlContent; //coverSheet is my field name not "content"
Thanks, Joey
Hi,
Thanks for your reply. I added the demo-ui-components (css & js) to my MVC page and it works but I have new issue saving the summernote field. it returns a NULL value. Other fields are okay. Please see my save function on my CreateOrEdit.js below:
cshtml:
@section Styles
{
<link rel="stylesheet" abp-href="/view-resources/Areas/App/Views/_Bundles/demo-ui-components.css" />
}
@section Scripts
{
<script abp-src="/view-resources/Areas/App/Views/_Bundles/demo-ui-components.js" ></script>
<script src="~/view-resources/Areas/App/Views/Tests/CreateOrEdit.js"></script>
}
CreateOrEdit.js
var _testsService = abp.services.app.tests;
var _$testInformationForm = null;
$('#coverSheet').summernote({
height: 300
});
_$testInformationForm = $('form[name=TestInformationsForm]');
function save() {
if (!_$testInformationForm.valid()) {
return;
}
var testFormData = _$testInformationForm.serializeFormToObject();
var htmlContent = $("#coverSheet").summernote('code');
testFormData.content = htmlContent;
abp.ui.setBusy();
_testsService.createOrEdit(
testFormData
).done(function () {
abp.notify.info(app.localize('SavedSuccessfully'));
window.location.href = "/App/Tests";
}).always(function () {
abp.ui.clearBusy();
});
}
$("#btnSave").click(save);
Again your help is much appreciated.
Hi Velu,
Thank you so much. I got your DevExpress Demo project.
Hi Velu,
You are the man. Your solution is what I've been looking for. We used DevExpress controls a lot in our previous web projects but I haven't done integrating/implementing yet to ASP.NET Zero project. If you can share your project, this will be a lot of help.
Please send to my email: [email protected]
Thanks a lot.
Cheers, Joey Javier