InsertAndReplaceContentControls inline

Integration questions/issues
Post Reply
Posts: 6
Joined: Mon Dec 24, 2018 10:56 pm

InsertAndReplaceContentControls inline

Post by Serhii » Mon Jan 07, 2019 9:56 pm


How to replace the existing inline "Content Control" with simple inline text?

The example code from the documentation

Code: Select all

window.Asc.plugin.executeMethod('InsertAndReplaceContentControls', [[{
          Props: {
            InternalId: currentCCInternalId
          Script: "var doc = Api.GetDocument(); var p = Api.CreateParagraph(); p.AddText('Hello world!'); doc.InsertContent([p]);"
adds unnecessary line break after "Hello world!", but I need to replace without it.

Post Reply