4

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?

1 Answer 1

6

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.

<a href="https://example.com" rel="noopener noreferrer" target="_blank">Example</a> 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.