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

target textareas #7

Open
airtonix opened this issue Sep 18, 2019 · 1 comment
Open

target textareas #7

airtonix opened this issue Sep 18, 2019 · 1 comment

Comments

@airtonix
Copy link

Please provide a right click menu option to enable on selected textareas.

good example is github.

@PyvesB
Copy link
Contributor

PyvesB commented Sep 20, 2019

Hello @airtonix,

Currently, the language used to configure the Monaco editor with syntax highlighting and basic IDE features is inferred from either the webpage's file extension or the returned content-type. As far as I can tell, we could not use such logic when enabling the extension on random selected text areas and would probably have to configure the editor as just plain text. This would significantly reduce available features and limit its usefulness.

As far as GitHub is concerned, the extension should in theory work flawlessly on raw pages. However, GitHub has a CSP sandbox policy and handling of this policy has been pretty much broken in all major browsers for years (see this Chrome bug and this Firefox bug amongst many others). Things seem to finally be moving on the Firefox side, as they have noticed that more and more extensions have been implementing dodgy code to overwrite CSP headers on the fly as a workaround - which defeats the point of CSP which was initially intended as a security feature.

Hope this makes sense!

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