protected function _get_new_editor_from_wp_editor($post_id)
{
$post = get_post($post_id);
if (empty($post) || empty($post->post_content)) {
return [];
}
$text_editor_widget_type = Plugin::instance()->widgets_manager->get_widget_types('text-editor');
// TODO: Better coding to start template for editor
return [['id' => Utils::generate_random_string(), 'elType' => 'section', 'elements' => [['id' => Utils::generate_random_string(), 'elType' => 'column', 'elements' => [['id' => Utils::generate_random_string(), 'elType' => $text_editor_widget_type::get_type(), 'widgetType' => $text_editor_widget_type->get_name(), 'settings' => ['editor' => $post->post_content]]]]]]];
}