Contentful logo

Contentful Community

Removing default editor via EditorInterface

I have a react UI extension app that creates a custom editor for a specific content type. This same app has an app config section that upon app install creates and publishes this content type using the content management javascript library. I am able to set the custom editor as the first editor for the content type via the state returned from the onConfigure call during the app install process but would like to also remove the default-editor from the content type altogether.

I am attempting to achieve this using the content management api like so:
let editorInterface = await contentType.getEditorInterface();
editorInterface.editors = editorInterface.editors.filter((editor) => editor.widgetId !== “default-editor”);
await editorInterface.update();

This seems to only sort of work? If after this code runs I subsequently call “await contentType.getEditorInterface()” the list of editors returned doesn’t include the default-editor, as I would expect, but if I view the content type within the contentful UI itself it still lists the default-editor.

Furthermore, when I view the list of editors in the Entry Editors tab within the UI, the save button becomes enabled as if I’ve made some actual change in the UI even though I haven’t. It almost seems like the UI is somehow out of sync with whatever data store in the backend has the updated, default-editorless, list of editors.

Anyone able to help out with this conundrum?