BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
help needed
i currently using version 19.4.0.38
and i am trying to insert a mergefield
in vbhtml view
<div id="documenteditor_container_body" style="display: flex;position:relative">
@Html.EJS().DocumentEditor("container").IsReadOnly(False).EnableOptionsPane(True).EnableSelection(True).EnableComment(True).Height("700px").Render()
</div>
in script
documenteditor = document.getElementById('container').ej2_instances[0];
documenteditor.editor.insertField('MERGEFIELD ' + fieldName + ' \\* MERGEFORMAT');
but the script crashes on hitting the above line at insertfield
any suggestions please
Hi Rene,
From your provided code snippet, we suspect that reported issue because of you missed to enable editor. Please check below code snippet:
<div style="display:block;width:100%;height:500px"> @Html.EJS().DocumentEditor("container").IsReadOnly(false).EnableEditor(true).EnableOptionsPane(true).EnableSelection(true).EnableComment(true).Height("700px").Created("onCreated").Render()
</div> </div> </div> <script>
var documenteditor;
function onCreated() { documenteditor = document.getElementById("container").ej2_instances[0]; var fieldName='field'; documenteditor.editor.insertField('MERGEFIELD ' + fieldName + ' \\* MERGEFORMAT'); documenteditor.resize(); }
|
Working sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DocumentEditor-sample1606328107
For your information, Document editor provides just the main document view area. Here, the user can compose, view, and edit the Word documents. You may prefer to use this component when you want to design your own UI options for your application.
Document editor container provides the main document view area along with the built-in toolbar and properties pane.
Regards,
Suriya M.
Solved with the measures i took on my newtonsoft issue, with the different version it worked
thanks
Thanks for your update.
Thanks for the help.
its working now
best regards