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

Highlight by text-color instead of background-color #23

Open
golopot opened this issue Dec 14, 2017 · 1 comment
Open

Highlight by text-color instead of background-color #23

golopot opened this issue Dec 14, 2017 · 1 comment

Comments

@golopot
Copy link

golopot commented Dec 14, 2017

Highlight like a normal text editor does.

This might be achieved by hiding the textarea and showing the fake layer.

@lonekorean
Copy link
Owner

I didn't think this would work because of issues with selecting text and caret visibility, but... it totally works. :) Will test further and consider more cases.

Test CSS:

.hwt-content {
    color: transparent;
    caret-color: black; /* Edge ignores this, but luckily doesn't need it */
}
.hwt-highlights {
    color: black !important;
}
.hwt-content mark {
    color: red;
    background-color: transparent;
}

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