Issue #2575 add await for clear() method execution in renderFromHTML

This commit is contained in:
nerozya_i 2023-12-27 17:13:40 +02:00
parent b8cfcaec26
commit d29cfce4e3

View file

@ -205,8 +205,8 @@ export default class BlocksAPI extends Module {
* @param {string} data - HTML string to render
* @returns {Promise<void>}
*/
public renderFromHTML(data: string): Promise<void> {
this.Editor.BlockManager.clear();
public async renderFromHTML(data: string): Promise<void> {
await this.Editor.BlockManager.clear();
return this.Editor.Paste.processText(data, true);
}