Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8725229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:59:42+00:00 2026-06-13T07:59:42+00:00

I use editor in my page when i want to update my values with

  • 0

I use editor in my page when i want to update my values with ajax i get this error:
Uncaught TypeError: Converting circular structure to JSON

this is my view:

@{
    Layout = null;
}

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Edit</title>

    <script type="text/javascript">
        $(function () {
            $("#editor").kendoEditor({
                value: "@Html.Raw(Model.Content)"
            });
            $("#back").click(function () {
                $.get('@Url.Action("Index", "Editor")', { siteId: "@ViewBag.SiteId", widgetId: "@Model.WidgetId" },
                              function (data) {
                                  $("div[data-role='popup']").remove();
                                  var indexContent = $(data).find("#content");
                                  $(indexContent).fadeIn(101);
                                  $("#content").replaceWith(indexContent);
                              });


            });
            var content = $("#editor").data("kendoEditor");
            $("#save").click(function () {
                var editor = {
                    Id: 1,
                    Content: content,
                    Title: 1,
                };

                $.ajax({
                    url: '@Url.Action("Update", "Editor")',
                    type: "POST",
                    contentType: "application/json charset=UTF-8",
                    dataType: "json",
                    data: JSON.stringify(editor),

                });
    });
        });
    </script>
</head>
<body>
    <div id="editorContainer">
        <div id="editorContent">
            <input type="text"  value="@Model.Title" style="width:300px" id="title"/>
            <textarea id="editor" rows="10" cols="30" style="width: 740px; height: 440px">
</textarea>
        </div>


    </div>
    <button id="save">ذخیره</button>
    <button id="back">بازگشت</button>
</body>
</html>

in my view i post value with jquery ajax but i get error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:59:43+00:00Added an answer on June 13, 2026 at 7:59 am
    saveButton.click(function () {
                    var model = {
                        Id: '@Model.Id',
                        Content: editor.data("kendoEditor").encodedValue(),
                        Title: $('#title').val(),
                    };
    
                    $.ajax({
                        url: '@Url.Action("Update", "Editor")',
                        type: "POST",
                        contentType: "application/json charset=UTF-8",
                        dataType: "json",
                        data: JSON.stringify({ editor: model, siteId: '@ViewBag.siteId' }),
                            success: function () {
                                alert('تغییرات مورد نظر با موفقیت اعمال شد.');
                                //window.parent.document.location.replace('@Url.Action("SiteIndex", "Editor")?' + parametrs);
                             },
                        error: function () {
                            alert('متاسفانه خطایی در سیستم رخ داد،دوباره تلاش کنید.');
                        }
                    });
                });
    

    this is right

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use Mercury Editor (https://github.com/jejacks0n/mercury) to edit posts in the blog area
I'm looking to use in_place_editor_field on an Index page of items. Basically I want
I am using asp.net, i have added tinyMCE editor to my page. I want
I want to make multiple editing page. But I don't know how to use
I want a WYSIWYG html editor to create a static web page. After some
I want to add my custom component in the eclipse provided Web page Editor
I want to use the following method whenever the GET or POST is called
I am looking to use a wysiwyg javascript editor. What I want to do
I use VIM editor for PHP, i know many people will point to PDT
I have list of textareas. For textareas I use tinyMCE Editor. When I start

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.