Closed vanillajonathan closed 10 months ago
The problem it solves is it avoids any potential conflicts when using other libraries and code that might also use data attributes by putting all EasyMDE-related data attributes in its own namespace.
This is also done by Bootstrap.
Data attributes for all JavaScript plugins are now namespaced to help distinguish Bootstrap functionality from third parties and your own code. For example, we use
data-bs-toggle
instead ofdata-toggle
.
https://getbootstrap.com/docs/5.2/migration/#javascript
It is not a breaking change since the data-img-src
(now data-mde-img-src
) attribute is not part of the public API, it is not mentioned anywhere in the documentation, it is an internal concern only.
Even though it is not documented, it is still part of the public API and can be used for styling purposes (see here: https://github.com/Ionaru/easy-markdown-editor/blob/master/src/css/easymde.css#L368).
There's a reasonable chance other developers have used that attribute to hook in extra functionality or style an element in the 2 years data-img-src
has existed.
I see. I was not aware it was considered part of the public API. The data attribute is not mentioned in the documentation.
If you don't want to merge it, consider assigning the PR to a Project or a Label for the upcoming major rewrite.
Ref #447
Yeah, I saw that post. Good that you made a ref to it. GitHub includes "Projects" and "Labels" too which can be assigned to issues and pull requests.
What problem does this solve?
Also would be a breaking change.