I want my LinkItem to get target="_blank" if my node has the checkbox checked I'm not sure if hook_preprocess_node is the right hook. But I cant find the setting for target in the LinkItem. Can you help me?

A different approach I failed is to extended the FieldWidget of Link and add a checkbox to toggle the target setting. I wasn't able to save this setting though...

class TargetLinkWidget extends LinkWidget {
  public static function defaultSettings() {
    return ['target' =&gt; ''] + parent::defaultSettings();
  }

  public function formElement(FieldItemListInterface $items, $delta, array $element, array &amp;$form, FormStateInterface $form_state) {
    $element = parent::formElement($items, $delta, $element, $form, $form_state);

    $element['target'] = [
      '#type' =&gt; 'checkbox',
      '#title' =&gt; t('Open link in new window'),
      '#value' =&gt; '_blank',
      '#default_value' =&gt; $this-&gt;getSetting('target'),
    ];
    return $element;
  }
}
According to your answer to my comment on the question, you are using a view. To have my solution work, it needs to display fields, not teasers.

First off, you do not need to add an additional field to the node type/content type.

All you need to do is to add the already displayed link field in views a second time. All fields get a views internal machine name which is often identical to the field's machine name. However, if you add a field twice, you will end up with two machine names, thus you can determine which version of the rendered field to use at some point.

So, you end up having the same field (Link - field_link) showing up twice in your view's field list. The one added first will be accessible through the token [field_link], the second one by using [field_link_1].

In the first one's settings, choose the plain URL formatter and then go to the "Rewrite result" section. Select the option to output the field as link and enter [field_link] as url and _blank for target:

 





Finally, set the option "Exclude from display". Repeat that with the second link field, but use [field_link_1] as url and do not set the target.

With both field instances set up and excluded from display, add your checkbox field which may have the machine name field_link_is_external.

Now you need to rewrite that field to be [field_link]:

 

If the checkbox is checked, the link version with target set "_blank" will be shown.

Next, you need to set the "No result behaviour" as follows:



If the checkbox is not checked, it's value is zero, hence we treat 0 as empty and thus the second link field (w/o target) will be shown.

And that's all there is to it. No need for any editor to enter some url twice. They just need to set the link and decide whether or not to check that checkbox.