-
Notifications
You must be signed in to change notification settings - Fork 28
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
Disable automatic bracket/quote closing #7
Comments
In all languages or a specific one? |
Lea, what do you think about this approach for allowing the behavior to be toggled off? https://github.com/AgentEnder/live/tree/feat/allow-disabling-of-pairs |
@LeaVerou In my case I just need to disable it completely on a specific textarea. I'm adding prism <pre><code> blocks inside the textarea and as I type the code, it's matching the pairs which is functionality I'd like to avoid as a personal choice. Thanks for the help! |
@LeaVerou if you don't think the If its ok with you, I'll open a PR with my current impl. and we can continue the discussion on it. |
Would running this work for you or are you looking for an HTML-based way? Prism.Live.pairs = {}; |
@LeaVerou I think that should work. I can't speak for others but I'm only using one textarea so it's fine in my case. |
Oh I see, @AgentEnder wants to disable on a specific textarea. That won't work then, it needs to be an attribute. The currently proposed design violates several HTML design principles, but the general idea is sound. I'd suggest a |
Gotcha @LeaVerou . I'll update the branch and open a PR |
@LeaVerou any updates on this one? |
I wonder if the reason you are asking to disable it is because it doesn't work so well in some cases. If so, perhaps we should focus on fixing it for those cases? Just a thought. |
Honestly, at this point I've not used prism in about a year, let alone prism live. Nothing against the either library as I love them both, I've just not had a recent need. Unfortunately, this means I don't really remember the pain point I had encountered. I don't care to close out that PR, if others are not running into similar pain points. |
The reason I was hoping for the feature was because I was writing a blog about programming so the automatic closing was just inconvenient. I still think it would be a good option to have, and I'll certainly be using the library again in the future. Currently I'm not using it either so I have no immediate need for the change. |
Hi, Any update on this issue and the proposed PR ? Thanks ! |
I'd love to merge a PR on this, and to work with someone to implement this functionality with a good API. I don't have time to implement it myself currently. The linked PR is closed, but I just commented if the OP wants to pick this back up. |
Love the extension, it works so well.
How can I disable the automatic bracket/quote closing functionality?
When I type
(
or"
, I'd rather it didn't add)
or"
after.Can't seem to find where that code is.
Thanks for all your efforts.
The text was updated successfully, but these errors were encountered: