Add editable preview mode to Markdown editor#669
Open
vishwamartur wants to merge 1 commit intouiwjs:masterfrom
Open
Add editable preview mode to Markdown editor#669vishwamartur wants to merge 1 commit intouiwjs:masterfrom
vishwamartur wants to merge 1 commit intouiwjs:masterfrom
Conversation
Related to uiwjs#664 Add editable preview mode to the Markdown editor. * **New Command**: Add `editablePreview` command in `core/src/commands/preview.tsx` to allow editing in preview mode. * **TextArea Component**: Update `core/src/components/TextArea/index.tsx` to support rendering an editable preview mode. * **Editor State Management**: Update `core/src/Editor.tsx` to manage the state and rendering of the editable preview mode. * **Context Management**: Update `core/src/Context.tsx` to include support for editable preview mode in the context and state management.
|
@vishwamartur is attempting to deploy a commit to the kenny wong's projects Team on Vercel. A member of the Team first needs to authorize it. |
jaywcjlove
reviewed
Nov 1, 2024
| }, | ||
| }; | ||
|
|
||
| export const editablePreview: ICommand = { |
Member
There was a problem hiding this comment.
react-md-editor/core/src/index.tsx
Lines 6 to 9 in 2520e88
export { editablePreview } from './commands/preview';@vishwamartur It is necessary to export editablePreview in the entry point.
jaywcjlove
reviewed
Nov 1, 2024
Comment on lines
+101
to
+108
| icon: ( | ||
| <svg width="12" height="12" viewBox="0 0 520 520"> | ||
| <polygon fill="currentColor" points="0 71.293 0 122 179 122 179 397 0 397 0 449.707 232 449.413 232 71.293" /> | ||
| <polygon | ||
| fill="currentColor" | ||
| points="289 71.293 520 71.293 520 122 341 123 341 396 520 396 520 449.707 289 449.413" | ||
| /> | ||
| </svg> |
Member
There was a problem hiding this comment.
@vishwamartur Do you need me to make a default icon for you?
jaywcjlove
reviewed
Nov 1, 2024
| <Textarea prefixCls={prefixCls} {...otherProps} style={textStyle} /> | ||
| ) : ( | ||
| <Textarea prefixCls={prefixCls} {...otherProps} style={textStyle} readOnly /> | ||
| )} |
Member
There was a problem hiding this comment.
@vishwamartur Can this code be optimized to the following example?
<Textarea prefixCls={prefixCls} {...otherProps} style={textStyle} readOnly={preview != 'editablePreview'} />|
@jaywcjlove Is this something we will see being merged in soon? Opened since Nov 2024. Not sure if this will resolve #695 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related to #664
Add editable preview mode to the Markdown editor.
editablePreviewcommand incore/src/commands/preview.tsxto allow editing in preview mode.core/src/components/TextArea/index.tsxto support rendering an editable preview mode.core/src/Editor.tsxto manage the state and rendering of the editable preview mode.core/src/Context.tsxto include support for editable preview mode in the context and state management.