Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
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