Question: How can I add a block with some HTML to the **Node Add/Edit form**? I've tried adding a new `#markup` field but I couldn't position it where I need by using `weight`.

See image below for desired location: just below the vertical tabs displayed to the right in the Seven theme.

[![Node edit form](https://i.stack.imgur.com/Gi6vV.png)](https://i.stack.imgur.com/Gi6vV.png)

Answer: 
If you're looking insert renderable elements into the form array in the same manner as the grouped vertical tabs, you can [`hook_form_alter()`](https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Form%21form.api.php/function/hook_form_alter/8.2.x) your way to this via adding a `details` form element:

```
function MYMODULE_form_alter(&$form, $form_state, $form_id) {

  // @TODO: Add your own logic for filtering relevant node forms
  if (in_array($form_id, array('node_page_form', 'node_page_edit_form'))) {
    $form['example'] = array(
      '#type' => 'details',
      '#title' => t(''),
      '#description' => t(''),
      '#group' => 'advanced',
      '#open' => TRUE,
      'markup' => array(
        '#markup' => '<p>Random Markup</p>',
      ),
      '#weight' => 1000,
    );
  }
}

```

If you're looking to add markup that's not relevant to your node forms, you might be better off subtheming Seven and adding your own [**node-edit-form.html.twig**](https://api.drupal.org/api/drupal/core!themes!classy!templates!content-edit!node-edit-form.html.twig/8.2.x) template to your subtheme with your own markup additions:

```
<div class="layout-node-form clearfix">
  <div class="layout-region layout-region-node-main">
    {{ form|without('advanced', 'actions') }}
  </div>
  <div class="layout-region layout-region-node-secondary">
    {{ form.advanced }}
    <p>Random Markup</p>
  </div>
  <div class="layout-region layout-region-node-footer">
    {{ form.actions }}
  </div>
</div>

```
Just place your block under Main content block on content region in Seven theme, It would place your block in bottom of the form, then you could design that with custom css.

Add the `/node/*/edit` `/node/add/*` paths in the block visibility field, it would add the block only on the node edit page, else the block will show in all the admin pages.