let _obj = {“commonPr” :{“Id” : 1,“Tag” : “{Document1}”,“Lock” : 3,“Appearance” : 2},“type”:1}
let getHTMLContent = "
1. Testing For SME Required inClause Type
<div class="clause-content" style="margin-left: 20px;">
<p>Testing For SME Required inClause Type</p>
</div>
</div></div>";
window.Asc.plugin.executeMethod("AddContentControl", [_obj.type, _obj.commonPr],() => {
window.Asc.plugin.executeMethod(
"GetAllContentControls",
[],
(returnValue) => {
returnValue
.forEach((control) => {
if(control.Id ===1){
const id = control.InternalId;
//const key = control.Tag.slice(tagPrefix.length)
//const value = values[key]
window.Asc.plugin.executeMethod(
"SelectContentControl",
[id],
() => {
window.Asc.plugin.executeMethod("PasteHtml", [getHTMLContent], (data)=>{
console.log(data)
})
}
)
}
})
});
})