<p>This isn't a direct answer to your question, but I wanted to share what I've done. My hope is that this will prevent your need to revert your database.</p>
<p>I have a site that made liberal use of Redactor fields. Like you, I have converted these redactor field to CKEditor with the console command <code>ckeditor/convert/redactor</code>.</p>
<p>Since <strong>CKEditor</strong> doesn't suppor the ability to allow a user to open a link in a new window &quot;out of the box,&quot; I next went into my CKEditor config options. Find this in <code>/admin/settings/ckeditor</code> and then find the settings that were created during the Redactor migration. For each configuration, I added the following to restore the option to open a link in a new window.</p>
<pre><code>{
  &quot;link&quot;: {
    &quot;addTargetToExternalLinks&quot;: false,
    &quot;decorators&quot;: {
      &quot;openInNewTab&quot;: {
        &quot;attributes&quot;: {
          &quot;rel&quot;: &quot;noopener noreferrer&quot;,
          &quot;target&quot;: &quot;_blank&quot;
        },
        &quot;label&quot;: &quot;Open in a new tab&quot;,
        &quot;mode&quot;: &quot;manual&quot;
      }
    }
  },
  ... other config options here ...
}
</code></pre>
<p>My assumption is that the Redactor migration didn't alter the contents of each field, but only altered the field settings. Since the CKEditor config now allows the &quot;Open in a new tab&quot; functionality, I think each entry's contents will maintain the original format for each link created in Redactor that had previously been set to hope in a new window when opened and resaved.</p>
<pre><code>&lt;a href=&quot;https://example.com&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Example&lt;/a&gt;
</code></pre>

CC BY-SA 4.0
2024-05-06T12:21:07.487Z
2024-05-06T12:21:07.487Z
John Morton
<p>Since Redactor is abandoned I've moved to CKEditor. There are plenty of entries with external links that are target blank with rel nofollow added. This has been altered (console command used as specified in docs/update guide). I'd like to revert it with a backup I have.</p>
<p>What would be the correct approach to migrate once again but not killing existing formatting/attributes?</p>

<redactor><migration><ckeditor>
Redactor to CKEditor Migration
# Redactor to CKEditor Migration

(Asked by: username_0 on 2024-05-03)

Since Redactor is abandoned I've moved to CKEditor. There are plenty of entries with external links that are target blank with rel nofollow added. This has been altered (console command used as specified in docs/update guide). I'd like to revert it with a backup I have.

What would be the correct approach to migrate once again but not killing existing formatting/attributes?

**Tags:** redactor, migration, ckeditor


---

## 1 answers

### Answer by username_1 on 2024-05-06. Score: 4

This isn't a direct answer to your question, but I wanted to share what I've done. My hope is that this will prevent your need to revert your database.
I have a site that made liberal use of Redactor fields. Like you, I have converted these redactor field to CKEditor with the console command ckeditor/convert/redactor.
Since CKEditor doesn't suppor the ability to allow a user to open a link in a new window "out of the box," I next went into my CKEditor config options. Find this in /admin/settings/ckeditor and then find the settings that were created during the Redactor migration. For each configuration, I added the following to restore the option to open a link in a new window.
{
  "link": {
    "addTargetToExternalLinks": false,
    "decorators": {
      "openInNewTab": {
        "attributes": {
          "rel": "noopener noreferrer",
          "target": "_blank"
        },
        "label": "Open in a new tab",
        "mode": "manual"
      }
    }
  },
  ... other config options here ...
}

My assumption is that the Redactor migration didn't alter the contents of each field, but only altered the field settings. Since the CKEditor config now allows the "Open in a new tab" functionality, I think each entry's contents will maintain the original format for each link created in Redactor that had previously been set to hope in a new window when opened and resaved.
Example


---

