Skip to content
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

Feature request: Format code #67

Closed
nwittwer opened this issue Apr 23, 2020 · 2 comments
Closed

Feature request: Format code #67

nwittwer opened this issue Apr 23, 2020 · 2 comments

Comments

@nwittwer
Copy link

Hi, first of all great plugin! The example was really helpful for getting started.

I was curious if there's a way to trigger a code formatting action? When I paste code into a vue-prism-editor textarea, I'd like it to format the code, remove whitespace, etc. This would be similar to clicking "tidy" in Codepen or "format" in VSCode.

If this is outside the scope of the project, it would be great to be able to easily add plugins like normalize-whitespace. I know plugins are not currently supported.

@nwittwer
Copy link
Author

nwittwer commented Apr 23, 2020

Was able to get a "tidy" button working using js-beautify (npm package).
Example: https://codesandbox.io/s/vue-prism-editor-beautify-example-sgyoc?file=/src/components/HelloWorld.vue

@koca koca mentioned this issue Jun 21, 2020
@koca
Copy link
Owner

koca commented Aug 8, 2020

Released new version v1 🎉

@koca koca closed this as completed Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants