Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Updated `EuiText`s `blockquote` font-size/line-height to match the base font-size/line-height which is the same as paragraphs ([#4663](https://github.com/elastic/eui/pull/4663))
- Added `markdownFormatProps` prop to `EuiMarkdownEditor` to extend the props passed to the rendered `EuiMarkdownFormat` ([#4663](https://github.com/elastic/eui/pull/4663))
- Added optional virtualized line rendering to `EuiCodeBlock` ([#4952](https://github.com/elastic/eui/pull/4952))
- Added a console warning for the deprecation of `EuiCodeEditor` ([#4984](https://github.com/elastic/eui/pull/4984))

**Bug fixes**

Expand Down
19 changes: 19 additions & 0 deletions src-docs/src/views/code/code_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import { Link } from 'react-router-dom';
import { GuideSectionTypes } from '../../components';

import {
EuiCallOut,
EuiCode,
EuiCodeBlock,
EuiLink,
EuiText,
EuiSpacer,
} from '../../../../src/components';
import { codeBlockConfig, codeConfig } from './playground';

Expand Down Expand Up @@ -39,6 +41,23 @@ export const CodeExample = {
title: 'Code',
intro: (
<>
<EuiCallOut title="EUI provides support for static code">
Comment thread
thompsongl marked this conversation as resolved.
Outdated
<p>
<strong>EuiCode</strong> and <strong>EuiCodeBlock</strong> are
intended to render static lines or blocks of code in read-only
Comment thread
thompsongl marked this conversation as resolved.
Outdated
contexts.
<br />
If you need capabilities to edit, or want to print long code (e.g.,
Comment thread
thompsongl marked this conversation as resolved.
Outdated
printing JSON from an API), use{' '}
<EuiLink
external
href="https://github.com/elastic/kibana/tree/master/src/plugins/kibana_react/public/code_editor">
<strong>CodeEditor</strong> (within Kibana)
</EuiLink>
.
Comment thread
thompsongl marked this conversation as resolved.
Outdated
</p>
</EuiCallOut>
<EuiSpacer />
<EuiText>
<p>
The <strong>EuiCode</strong> and <strong>EuiCodeBlock</strong>{' '}
Expand Down
3 changes: 3 additions & 0 deletions src/components/code_editor/code_editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import { keysOf } from '../common';
import { htmlIdGenerator, keys } from '../../services';
import { EuiI18n } from '../i18n';

console.warn(`[EUI] - DEPRECATION: \`EuiCodeEditor\` is deprecated and will be removed in a future release.
Comment thread
thompsongl marked this conversation as resolved.
Outdated
See https://ela.st/euicodeeditor for migration options.`);

const DEFAULT_MODE = 'text';
const DEFAULT_THEME = 'textmate';

Expand Down