-
Notifications
You must be signed in to change notification settings - Fork 860
[EuiMarkdownEditor] Added popover to display help syntax text when no custom plugins are available #5147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
elizabetdev
merged 31 commits into
elastic:master
from
elizabetdev:md-editor-syntax-help-no-plugins-ui
Sep 22, 2021
Merged
[EuiMarkdownEditor] Added popover to display help syntax text when no custom plugins are available #5147
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
721d094
Added popover to display help syntax text when no plugins are available
elizabetdev 0d7fd8e
New title for the example
elizabetdev 39e77e2
Adding CL
elizabetdev 90a669a
Made opting out of the tooltip markdown plugin much easier
chandlerprall 34ba51d
Merge pull request #23 from chandlerprall/md-editor-syntax-help-no-pl…
elizabetdev d6b1585
Merge remote-tracking branch 'upstream/master' into md-editor-syntax-…
elizabetdev c20910f
Improving text and example
elizabetdev 50d84b5
Example text
elizabetdev 2aecd82
Added CL line
elizabetdev 54e7a76
CL again
elizabetdev 51aabb2
Adding tests
elizabetdev fbd09a8
Merge remote-tracking branch 'upstream/master' into md-editor-syntax-…
elizabetdev b80b9d5
Merge remote-tracking branch 'upstream/master' into md-editor-syntax-…
elizabetdev 973fcf0
Merge remote-tracking branch 'upstream/master' into md-editor-syntax-…
elizabetdev a1b3e0a
unified types
thompsongl 339d9d4
Merge pull request #24 from thompsongl/md-editor-syntax-help-no-plugi…
elizabetdev e66ca53
No more HTML tabs
elizabetdev b39ffb7
Update src-docs/src/views/markdown_editor/mardown_editor_example.js
elizabetdev 5bc410b
Update src-docs/src/views/markdown_editor/mardown_editor_example.js
elizabetdev 60d6780
Merge branch 'md-editor-syntax-help-no-plugins-ui' of https://github.…
elizabetdev 6e6fc3f
Code review
elizabetdev 7b5d5cc
Merge remote-tracking branch 'upstream/master' into md-editor-syntax-…
elizabetdev 5cabc57
No more help syntax tooltip
elizabetdev 14099c5
No plugins with just a tooltip
elizabetdev 32aa812
CL
elizabetdev d82b9a7
Removed unnecessary styles
elizabetdev 42107e3
CL
elizabetdev 92dadbc
Merge remote-tracking branch 'upstream/master' into md-editor-syntax-…
elizabetdev 96492da
Merge remote-tracking branch 'upstream/master' into md-editor-syntax-…
elizabetdev 6d94f22
Popover and new github link
elizabetdev b418a88
Only show modal for `hasUiPluginsWithHelpText`
elizabetdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src-docs/src/views/markdown_editor/markdown_editor_no_plugins.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import React, { useState } from 'react'; | ||
|
|
||
| import { | ||
| EuiMarkdownEditor, | ||
| getDefaultEuiMarkdownPlugins, | ||
| } from '../../../../src/components'; | ||
|
|
||
| const initialContent = `## This is how we do it :smile: | ||
|
|
||
| In this example, we unregistered the built in **tooltip** plugin. So the button in the toolbar and the help syntax won't be displayed. | ||
|
|
||
| And the following syntax no longer works. | ||
|
|
||
| !{tooltip[anchor text](Tooltip content)} | ||
| `; | ||
|
|
||
| const { | ||
| parsingPlugins, | ||
| processingPlugins, | ||
| uiPlugins, | ||
| } = getDefaultEuiMarkdownPlugins({ exclude: ['tooltip'] }); | ||
|
|
||
| export default () => { | ||
| const [value, setValue] = useState(initialContent); | ||
|
|
||
| return ( | ||
| <> | ||
| <EuiMarkdownEditor | ||
| aria-label="EUI markdown editor with no default plugins demo" | ||
| value={value} | ||
| onChange={setValue} | ||
| parsingPluginList={parsingPlugins} | ||
| processingPluginList={processingPlugins} | ||
| uiPlugins={uiPlugins} | ||
| /> | ||
| </> | ||
| ); | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.