Comments (7)
Do you mean updating Highlight.js? Or are you proposing something else?
from cryptopaste.
@anshuman73 Ping, can you update please?
from cryptopaste.
Hi, sorry for the delayed response.
I was suggesting setting Syntax highlighting for languages while the text is being entered.
currently, the viewer chooses the language to highlight the syntax for, wouldn't it be better if the paster can set the syntax too and the viewer gets that syntax highlighting automatically ?
from cryptopaste.
A potential way could be to store the language in the crypt, but (with my limited cryptographic knowledge), I believe it would make the crypt insecure.
from cryptopaste.
I had thought about some method of storing a language pre-set (e.g. injecting a language marker into the paste before being encrypted), but I decided not to namely since I wasn't sure how to do the whole thing well.
I don't know of a good way to take Highlight.js and apply it to a rich text editor. If you have some idea, I'd be delighted to review a pull request.
from cryptopaste.
After looking around, it appears CodeMirror would be the best option here. It would need to make sure to invoke the cmObj.toTextArea()
function before doing the in-browser encryption. Also needs to provide a selection for languages (listed from CodeMirror.modes
object), then I believe use cmObj.setOption('mode', '<language>')
to change them.
from cryptopaste.
Hi, if you want to put add-on like code beautifier you can find libraries on the internet and integrate it
from cryptopaste.
@adrivanrex You're more than welcome to submit a pull request with that or any suitable syntax highlighting library added.
from cryptopaste.
trapizoid
from cryptopaste.
Unlock
from cryptopaste.
Related Issues (14)
- Show when paste expires on view paste HOT 5
- Month and Year expirations are off HOT 2
- ocramius (proxy-manage) HOT 4
- Captcha being covered by buttons HOT 2
- Expired SSL HOT 1
- Sitemap HOT 1
- Manosa
- Error message on successful decrypt HOT 6
- CAPTCHA Error still shows after successfully submitting paste HOT 2
- [Feature Request] Allow pastes without a password HOT 1
- AES CCM is inferior to GCM. HOT 3
- Easy crack on password HOT 6
- Burn after reading shown as never expires HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cryptopaste.