diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a4bc7170df..28797bffef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Added `utcOffset` prop to `EuiSuperDatePicker` ([#3436](https://github.com/elastic/eui/pull/3436)) - Added `partition` key to `EuiChartThemeType` for Partition chart support ([#3387](https://github.com/elastic/eui/pull/3387)) - Updated `EuiImage`'s `caption` prop type from `string` to `ReactNode` ([#3387](https://github.com/elastic/eui/pull/3387)) +- Fixed `EuiCodeEditor` console error when using the editor without import the default theme ([#3454](https://github.com/elastic/eui/pull/3454)) **Bug Fixes** diff --git a/src/components/code_editor/__snapshots__/code_editor.test.tsx.snap b/src/components/code_editor/__snapshots__/code_editor.test.tsx.snap index a2b499f3552..bb4c16c2d92 100644 --- a/src/components/code_editor/__snapshots__/code_editor.test.tsx.snap +++ b/src/components/code_editor/__snapshots__/code_editor.test.tsx.snap @@ -87,7 +87,7 @@ exports[`EuiCodeEditor is rendered 1`] = `

@@ -203,7 +203,7 @@ exports[`EuiCodeEditor props aria attributes allows setting aria-describedby on

@@ -319,7 +319,7 @@ exports[`EuiCodeEditor props aria attributes allows setting aria-labelledby on t

@@ -435,7 +435,7 @@ exports[`EuiCodeEditor props isReadOnly renders alternate hint text 1`] = `

diff --git a/src/components/code_editor/code_editor.tsx b/src/components/code_editor/code_editor.tsx index 1d25c9e8cc8..fb3da63061e 100644 --- a/src/components/code_editor/code_editor.tsx +++ b/src/components/code_editor/code_editor.tsx @@ -25,10 +25,8 @@ import { keysOf } from '../common'; import { htmlIdGenerator, keyCodes } from '../../services'; import { EuiI18n } from '../i18n'; -import 'brace/theme/github'; - const DEFAULT_MODE = 'text'; -const DEFAULT_THEME = 'github'; +const DEFAULT_THEME = 'textmate'; function setOrRemoveAttribute( element: HTMLTextAreaElement,