RemoveFieldWrapper

RemoveFieldWrapper([fieldId])

Removes a field wrapper, leaving only the field content.

Parameters:

Name Type Default Description
fieldId string null

Field ID. If it is not specified, then the wrapper of the current field is removed.

Returns:

This method doesn't return any data.

Example

Copy code
window.Asc.plugin.executeMethod("GetAllAddinFields", null, function(arrFields) {
	let count = 0;
	arrFields.forEach(function(field) {
		if (field.Value.includes(bibPrefix) || field.Value.includes(citPrefix)) {
			count++;
			window.Asc.plugin.executeMethod("RemoveFieldWrapper", [field.FieldId], function() {
				count--;
				if (!count)
					window.Asc.plugin.executeCommand("close", "");
			});
		}
	});

	if (!arrFields.length)
		window.Asc.plugin.executeCommand("close", "");
});