i seen a ton of examples adding ContentEditorWebpart to publishing page, which i tried and works great.
my question is is there a way to ScriptEditorWebpart to publishing page using CSOM.
Changing the
<TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName>
tag to
<TypeName>Microsoft.SharePoint.WebPartPages.ScriptEditorWebPart</TypeName>
which in essence should work because both extend Microsoft.SharePoint.WebPartPages.Webpart Class
however i get and error in the PostQuery Response this is it:
[
{
"SchemaVersion":"15.0.0.0",
"LibraryVersion":"15.0.4569.1501",
"ErrorInfo":
{"ErrorMessage":
"The Microsoft.SharePoint.WebPartPages.ScriptEditorWebPart class
does not derive from the Microsoft.SharePoint.WebPartPages.
WebPart class and therefore cannot be imported or used in a
WebPartZone control.",
"ErrorValue":null,
"TraceCorrelationId":"980cca9d-f009-a078-9fca-b6f367086a64",
"ErrorCode":-1,
"ErrorTypeName":"Microsoft.SharePoint.WebPartPages.WebPartPageUserException"
},
"TraceCorrelationId":"980cca9d-f009-a078-9fca-b6f367086a64"
}
]