Open robinvandernoord opened 11 months ago
I see how this can cause problems for certain form implementations.
To not introduce a breaking change, I propose a new option to rename the image form field, with the default value "image"
as it currently is.
Does this sound like a solution that works for you, @robinvandernoord?
Yes that sounds great! I think I can try to create that option and make a PR if you like. Or would you prefer to build it yourself?
I would appreciate any help you can give :)
https://github.com/Ionaru/easy-markdown-editor/pull/573
I have created a PR. I looked into adding a cypress test for it but I didn't find any existing tests related to this feature. Is that correct or am I looking in the wrong place?
The npm run test
still runs successfully.
I have also added the option to the easymde.d.ts
type declaration.
I had similar problem, but with the .table class
I think the name is too generic.
It conflicts with the bootstrap .table class, which by default has 100% width. The result: (table takes 100% space).
As a workaround I did this:
$(function() {
$(".editor-toolbar .table").removeClass('table');
});
And just FYI: the only thing I modified in EasyMDE constructor is:
showIcons: ["code", "table"],
Describe the bug When using
upload-image
, an input with name="image" is created. This is a very generic name, which can conflict when using EasyMDE in a form.It changed the type from a file upload to a list of file uploads, and the inlined image was also not cleared, so my server received two files instead of one for my other 'image' field. Using a less generic name like 'easymde-image' would solve this issue.
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect easymde to not impact the normal behavior of my form by using a namespaced input or clearing/removing the new input after usage.
Screenshots
Version information
Additional context This may be more of a feature request than a bug, but it broke my project so I'm reporting it as a bug :)