-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[add] Image Uploader in edtior examples based on Fake API
[remove] deprecated Next.js export static command [optimize] update Upstream packages
- Loading branch information
Showing
8 changed files
with
1,540 additions
and
1,594 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 |
---|---|---|
@@ -1,19 +1,24 @@ | ||
import { | ||
AudioTool, | ||
CopyMarkdownTool, | ||
Editor, | ||
EditorProps, | ||
IFrameTool, | ||
ImageTool, | ||
OriginalTools, | ||
VideoTool, | ||
} from 'react-bootstrap-editor'; | ||
import { Constructor } from 'web-utility'; | ||
|
||
import { upload } from '../models/Base'; | ||
|
||
const ExcludeTools = [IFrameTool, AudioTool, VideoTool]; | ||
|
||
const CustomTools = OriginalTools.filter( | ||
Tool => !ExcludeTools.includes(Tool as Constructor<IFrameTool>), | ||
); | ||
ImageTool.prototype.save = upload; | ||
|
||
export default function HTMLEditor(props: EditorProps) { | ||
return <Editor tools={CustomTools} {...props} />; | ||
return <Editor tools={[...CustomTools, CopyMarkdownTool]} {...props} />; | ||
} |
This file contains 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 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 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
Oops, something went wrong.
b1c380d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for next-bootstrap-ts ready!
✅ Preview
https://next-bootstrap-a2cl0itgd-stevending1sts-projects.vercel.app
Built with commit b1c380d.
This pull request is being automatically deployed with vercel-action