I've defined a property that is called Reply
and the document type is RichTextEditor
.
I cannot get the value of Reply
. This problem is only for properties that type of it is RichTextEditor
!!!
How can I get the value of Rich Text Editor in Umbraco backoffice?
I've used Umbraco 7.x
and ASP.NET MVC
.
angular.module("umbraco").controller("Reply.controller", function ($scope, $http, $routeParams) {
$scope.SendReply = function () {
var contentId = $routeParams.id;
var replyText = $("#Reply").val(); // without value ??? (type of Reply is RichTextEditor)
var email = $("#Email").val(); // It's OK.
var dataObj = {
ReplyText: replyText,
ContentId: contentId,
Email: email,
};
$http.post("backoffice/Reply/ReplyToIncomingCall/ReplyMessage", dataObj).then
(
function (response) {
alert("YES!");
//TODO:
}
);
}
});
For getting the value of Reply
, you can use this code.
var replyList = $("[id*='Reply']");
for (i = 0; i < replyList.length; ++i) {
var rText = replyList[i].value;
if (!(rText === "" || rText === null)) {
replyText = rText;
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.