-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Add direct image upload to the EasyMDE field #3597
Add direct image upload to the EasyMDE field #3597
Conversation
}/${encodeURIComponent(blob.filename)}`; | ||
} | ||
|
||
get toolbarItems() { |
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.
Function toolbarItems
has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Code Climate has analyzed commit 94ad7fe and detected 0 issues on this pull request. View more on Code Climate. |
|
||
export default class extends Controller { | ||
static targets = ['element'] | ||
static targets = ["element"]; |
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.
This seems unrelated
} | ||
} | ||
|
||
_configureImageUploads(options) { |
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.
Let's use the JS private notiation please.
_configureImageUploads(options) { | |
#configureImageUploads(options) { |
Then can be used liek so this.#configureImageUploads()
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.
I haven't looked too much. please clean the PR from liting issues and console logs and re-request review please.
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.
Description
This PR adds a configurable image upload feature for the EasyMDE field.
It works by using the own editor's upload feature that receives a URL for an uploaded file and inserts it into the document.
Checklist:
Screenshots & recording
easy-mde-flow.mp4
Manual review steps
The only change needed for this feature to work is to add the
image_upload: true
flag to amarkdown
field.In my case, I added it to the projects in the Avo demo app:
field :description, as: :markdown, height: "350px", image_upload: true