How to pre-populate paragraphs when creating a page I have tried for some time to find out a way to populate a new page with a few paragraphs to save time on most of the pages (but which might change position or even get dropped for some pages) but so far haven't found a way to do.

I think I have found out how to do the paragraph adding part, but what I am missing is how to fire the code when a new node of relevant content type is created.

I have tried hook THEME_node_create and THEME_node_insert, but they seem not to be fired when a new node is requested. I read that not all hooks are implemented for a theme but how then to achieve this functionality? 

I probably (as most of the times) am missing something trivial, but please, help me find the light.

wbr

hank
Actually I found a solution using a module. It was not the first time to find the solution after asking it here so it was not in vain - even if I found it myself...

To help possible otrhers, here is my solution from my module's .module file

function acme_pre_populate_node_create(\Drupal\node\NodeInterface $node) {
  $i=0;
  if ($node-&gt;getType() == 'acme_basic_page') {
    $paragraph = \Drupal::entityTypeManager()-&gt;getStorage('paragraph')-&gt;create([
        'title' =&gt; 'Paragraph ' . $i,
        'type' =&gt; 'hero_image',
      ]);
      $node-&gt;field_paragraph_list[] = $paragraph;
      $i++;
      $paragraph = \Drupal::entityTypeManager()-&gt;getStorage('paragraph')-&gt;create([
          'title' =&gt; 'Paragraph ' . $i,
          'type' =&gt; 'one_column_text',
          'field_one_column_text' =&gt; "&lt;h1&gt;Change title here&lt;/h1&gt;&lt;p&gt;And contents here&lt;/p&gt;",
    ]);
        $node-&gt;field_paragraph_list[] = $paragraph;
       $i++;
  }
}