Commenting not working

Hello,


I've copied and pasted the Demo for DocumentEditor but when I press the comment button, the comment window pops up greyed out and I cannot write or click anything.



4 Replies 1 reply marked as answer

WL william lee July 15, 2022 05:02 PM UTC

It looks like @section Scripts isn't rendering. I've followed the instruction and added all the necessary code. What could be the issue here?





AE Ajithamarlin Edward Syncfusion Team July 18, 2022 05:42 AM UTC

Hi William,


Can you please share us your document editor version details.


Regards,

Ajithamarlin E



WL william lee July 18, 2022 04:46 PM UTC

Hi Ajithamarlin,


The code below is taken from the sample project source file so I did not make any changes from what is shown in the demo.

literally every other components work except the comments.

@{

    ViewBag.Title = "DocumentEditor";

    Layout = "~/Views/Shared/_Layout.cshtml";

}

@using Syncfusion.EJ2

<script src="~/scripts/documenteditor/import-helper.js"></script>


<div id = "ControlRegion">

<div class="control-section">

    <div class="control-section">

        <div id='documenteditor_titlebar' class="e-de-ctn-title"></div>

        <ejs-documenteditorcontainer id="container" enableToolbar=true height="590px"></ejs-documenteditorcontainer>

    </div>

</div>

</div>

<script>

    var documenteditor;

    document.addEventListener('DOMContentLoaded', function () {


        var documenteditorElement = document.getElementById("container");

        documenteditorElement.style.height = "590px";

        documenteditorElement.style.width = "100%";


        var container = documenteditorElement.ej2_instances[0];

        container.showPropertiesPane = false;

        documenteditor = container.documentEditor;

        documenteditor.currentUser = "user";

        documenteditor = documenteditorElement.ej2_instances[0].documentEditor;

        documenteditorElement.ej2_instances[0].serviceUrl = '/api/documenteditor/';

        var ajax = new ej.base.Ajax("@Url.Content("~/scripts/documenteditor/data-default.json")", 'GET', true);

        ajax.send().then();

        ajax.onSuccess = function (data) {

            documenteditor.open(data);

            documenteditor.documentName = 'Getting Started';

            documenteditor.showComments = true;

            updateDocumentTitle();

        };

        documenteditor.documentChange = function (args) {

            updateDocumentTitle();

        };

        titleBarDiv = document.getElementById('documenteditor_titlebar');

        initComponentAndWireEvent();

    });

</script>


<style>

    ...  //did not paste since its too long.

</style>



Marked as answer

SM Suriya Murugan Syncfusion Team July 21, 2022 07:21 AM UTC

Hi William,


We have tried in below sample and couldn't reproduce the reported issue. Can you please check it?


If you still facing the issue, Please share the document editor version details with how you have referred syncfusion scripts and then if possible, please share the video illustration. We suspect that any css overriden in your application.


Regards,

Suriya M.


Attachment: ASP.NET_Core_191945b9.zip

Loader.
Up arrow icon