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 EasyMDE options #3373
Add EasyMDE options #3373
Conversation
EasyMDE allows string and string-array. Since both are used as className, a space separated string is sufficient here.
There is a `sanitizerFunction`-option in the renderingConfig. This function does not allow to return a Promise - thus, `dotNetObjectRef.invokeMethodAsync` cannot be used here and the current dispatcher does not support synchronous calls from JS to .NET.
In contrast to EasyMDE, this defaults to `false` here.
EasyMDE allows a custom spellChecker function.. This is not supported, yet.
EasyMDE allows custom status bar items. This is not supported, yet.
In contrast to EasyMDE, the default value is `true`.
From what I can see in the PR I think you have covered most of the missing stuff and you did an excellent job. The thing that you mention is not working we can leave them for later if needed. The API will not change so once EasyMDE fixes those we can include it in Blazorise. Do you think that is OK? If you don't have any more work I think we can merge the PR. |
Yes, sure it's ok. I don't have further work to do on that. |
It seems this also causes an issue with forms that have the required="" attribute with Chromium based browsers returning an error that the form control is invalid and not focusable. |
Can you open a new issue with code to reproduce it? |
Since the auto focus does not work, if your text area has the required attribute Chromium based browsers like Chrome, Edge, Vivaldi, etc. will fail because they can't focus on the field that has the required field. I suspect this is related to the original issue that autofocus is not working. Just add a require field to the text area: Can't submit the form and browser fails with: |
closes #3297
closes #3361
I've added more options from https://github.com/Ionaru/easy-markdown-editor/#options-list
As discussed in #3361, it's a simple extension to the current implementation of the options.
So the new options work more or less as the current ones.
autofocus
seems not to work in general (even the most easiest example)What I can see is, that the option is properly (and I think correctly) forwarded to the codemirror instance
I've' opend a ticket for that: Options
autofocus
does not work Ionaru/easy-markdown-editor#399autoRefresh
: I have no idea how to test it, but what I can see is, that the option is properly (and I think correctly, too) forwarded to the codemirror instanceparsingConfig
: The optionunderscoresBreakWords
is not supported in CodeMirror.Readme: underscoresBreakWords does not exists in CodeMirror repository Ionaru/easy-markdown-editor#401
UploadImage
, so this option has an effect at all (alwaystrue
before)status
like thetoolbar
, but you want to have access to the codemirror instance in the functions there - and that's a bigger problem (would be very useful in thetoolbar
action, too)Since it's a slightly larger PR, I've splitted the commits on every option..