In
sn-plugin-lib later than 0.1.65, the size of the current page is also obtained through PluginFileAPI.getPageSize (first use getCurrentFilePath and getCurrentPageNum to get the file path and page number). In 0.1.65 and earlier, call getPageDisplaySize to get the current page display size and do not call getPageSize, otherwise the position data may not match.elements you pass in typically come from createElement or existing elements read from elsewhere; uuid stays the same before and after insertion. This API requires those elements to still be present in the native cache — elements that can’t be found in the cache are silently skipped instead of causing a separate error. See Element Caching and Release for details.
Parameters
Returns
APIResponse<boolean>:result === trueindicates the insertion succeeded
- Throws a parameter validation error when
elementsis not a valid element array - Throws a parameter validation error when
pageis not an integer greater than or equal to0 - Throws a parameter validation error when
layeris provided but is not an integer in the range0-3