Closed furyHuang closed 2 years ago
This is using the plug-in: example_ customfields_add, The plug-in cannot use this method
Hi, which DocumentServer version are you using?
Hi,This is my latest version:
I found no method using this type in sdkjs. Is it: addcontentcontrol has been deprecated or replaced by a new method? I query history. This method has not been used since 6.0 last year
Version 6.3.2 looks good
@askonev Please take a look at this problem
Api code:
builder.CreateFile("docx"); oDocument = Api.GetDocument(); oParagraph = oDocument.GetElement(0); oInlineLvlSdt = Api.CreateInlineLvlSdt(); oInlineLvlSdt.AddText("This is an inline text content control."); oParagraph.AddInlineLvlSdt(oInlineLvlSdt); builder.SaveFile("docx", "AddText.docx"); builder.CloseFile();
Can I get the current cursor position, and then I can call this API to get the current: oparagraph instead of: oparagraph = odocument. GetElement (0);, I need to insert in line content space at the cursor position instead of monopolizing a line
URL: addcontentcontrol This method execution is invalid
Hi @furyHuang! How relevant is your problem at the moment?
I have not been able to reproduce your problem. Please specify the js code with which you set the content control.
Hi @askonev After this reference plug-in, the plug-in cannot add custom fields . example_customfields_add ,The screenshot is as follows:
Hi @furyHuang. After executing the code
function privateCreateInlineControl()
{
window.Asc.plugin.executeMethod("AddContentControl", [2, {"Lock" : 3}]);
}
inline content control is added to the document and the cursor is inside it. Running the code again won't do anything because InlineCC can't be set to InlineCC since these are Run-level objects. To add InlineCC again you need to move the carriage out of the field.
This issue was closed due to no response.
window.Asc.plugin.executeMethod ("AddContentControl", [wrap, obj]); using this method in the plug-in has no effect, This is my code: window.Asc.plugin.executeMethod("AddContentControl", [2,{ "Lock" : 3 } ]);