diff --git a/src-docs/src/views/code_editor/code_editor_example.js b/src-docs/src/views/code_editor/code_editor_example.js index 195ebe7df3c..7f9109c8d55 100644 --- a/src-docs/src/views/code_editor/code_editor_example.js +++ b/src-docs/src/views/code_editor/code_editor_example.js @@ -1,84 +1,32 @@ import React from 'react'; -import { renderToHtml } from '../../services'; - -import { GuideSectionTypes } from '../../components'; - -import { EuiCode, EuiCodeEditor } from '../../../../src/components'; - -import { codeEditorConfig } from './playground'; - -import CodeEditor from './code_editor'; -const codeEditorSource = require('!!raw-loader!./code_editor'); -const codeEditorHtml = renderToHtml(CodeEditor); - -import ReadOnly from './read_only'; -const readOnlySource = require('!!raw-loader!./read_only'); -const readOnlyrHtml = renderToHtml(ReadOnly); - -import CustomMode from './custom_mode'; -const customModeSource = require('!!raw-loader!./custom_mode'); -const customModeHtml = renderToHtml(CustomMode); +import { EuiCode, EuiLink, EuiCallOut } from '../../../../src/components'; export const CodeEditorExample = { title: 'Code editor', sections: [ { - source: [ - { - type: GuideSectionTypes.JS, - code: codeEditorSource, - }, - { - type: GuideSectionTypes.HTML, - code: codeEditorHtml, - }, - ], text: ( -
-

- The EuiCodeEditor component is a wrapper around{' '} - react-ace (which itself wraps the ACE code - editor), that adds an accessible keyboard mode to it. You should - always use this component instead of AceEditor. -

-

- All parameters, that you specify are passed down to the underlying{' '} - AceEditor component. -

-
+ <> + +

+ The EuiCodeEditor, a wrapper of{' '} + react-ace, has been deprecated and will be + removed in a{' '} + + future release + + . +
+ If you are a Kibana developer, we recommend using the{' '} + + @kbn/monaco package + {' '} + within the Kibana codebase. +

+
+ ), - props: { EuiCodeEditor }, - demo: , - }, - { - title: 'Read-only', - source: [ - { - type: GuideSectionTypes.JS, - code: readOnlySource, - }, - { - type: GuideSectionTypes.HTML, - code: readOnlyrHtml, - }, - ], - demo: , - }, - { - title: 'Custom mode', - source: [ - { - type: GuideSectionTypes.JS, - code: customModeSource, - }, - { - type: GuideSectionTypes.HTML, - code: customModeHtml, - }, - ], - demo: , }, ], - playground: codeEditorConfig, };