Open borodean opened 1 year ago
Can you explain why you want access to the options
property?
Also changing options usually has no effect after the editor is created, maybe those should be read-only?
Hi, and thank you for an excellent library and a quick reply!
Can you explain why you want access to the options property?
I'm implementing an imageUploadFunction
, and to mimic some of the original behavior, it wants to access the resolved options like insertTexts
, imageMaxSize
etc.
Also changing options usually has no effect after the editor is created, maybe those should be read-only?
If that's the case, I agree. We should make them read-only. Do you want me to push an update?
I'm also unsure whether cherry-picking required fields will be challenging to maintain. Perhaps this would be enough:
options: EasyMDE.Options;
In this case, however, all the work of checking the fields for null
/undefined
falls on the shoulders of the end users.
This PR exposes the
EasyMDE.prototype.options
field and marks the guaranteed fields as non-nullable.