4 ms·
even though the source is visible, the tags are unselectable. adding that would make it perfect imho. just heard about quines the other day so pretty cool to se
by vectorEQ 7y ago
even though the source is visible, the tags are unselectable. adding that would make it perfect imho. just heard about quines the other day so pretty cool to see one :D good effort!
- LeonB 7y agoI can’t think of a way to do that. When content is added via css it’s not selectable. Maybe fork it and see what you can do? https://github.com/secretGeek/html_wysiwyg/ https://github.com/secretGeek/html_wysiwyg/
- uryga 7y agoi'm on my phone, but wouldn't something like this work? *::before, *::after { user-select: text; // or `all`? }
- LeonB 7y agoI had a look into it; user-select doesn't apply to before/after content. This process has taught some interesting things about browsers. For example: `<br>` and `<img />` elements are "replaced" and can't really be shown in the way all other elements are. (I conveniently avoided using them). And, as described above, ::before/::after content cannot be selected, and generally behave... strangely.
- neogodless 7y ago`<hr>` too? And `<marquee>`? Did you see any variance between browsers? Hopefully not, with "common" CSS like this, but it would be interesting.
- coreymatyas 7y agoCSS spec says no, unfortunately. Pseudo-elements aren't part of the DOM and thus can't be selected by any means.
- LeonB 7y agothe only approach remaining would be to have some minimal vanilla js, as part of the page, that rewrites the dom to include the tags. This would also alleviate the need to use CSS, and in particular the repetitive CSS. It would also allow the tags/attributes to be styled in a more idiomatic way. But i'm out of time on this idea ;)
- collinmanderson 7y agoI also noticed that ctrl+f doesn't find search that text either.