diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx index 4ad86e495831e..b9732aaa183d0 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx @@ -105,7 +105,6 @@ function EditorUI({ initialTextValue }: EditorProps) { const loadBufferFromRemote = (url: string) => { const coreEditor = editor.getCoreEditor(); - if (/^https?:\/\//.test(url)) { const loadFrom: Record = { url, @@ -121,7 +120,8 @@ function EditorUI({ initialTextValue }: EditorProps) { // Fire and forget. $.ajax(loadFrom).done(async (data) => { - await editor.update(data, true); + // when we load data from another Api we also must pass history + await editor.update(`${initialTextValue}\n ${data}`, true); editor.moveToNextRequestEdge(false); coreEditor.clearSelection(); editor.highlightCurrentRequestsAndUpdateActionBar();