4 ms·
Yeah I'd like to have that too. Don't know yet how I'd implement it, but logged here and happy to take Merge Requests: https://gitlab.com/vincenttunru/obfuscate
by Vinnl 4y ago
Yeah I'd like to have that too. Don't know yet how I'd implement it, but logged here and happy to take Merge Requests: https://gitlab.com/vincenttunru/obfuscate/-/issues/3 https://gitlab.com/vincenttunru/obfuscate/-/issues/3
- mmis1000 4y agoProbably by - locate the text node containing the selected text - split the text node into 3 segment (the selected one in the middle) - replace the selected segment with a span that has font style on it ? I did something like this before to replace part of the text with a ruby tag. https://codepen.io/mmis1000/pen/gOgKqba?editors=0010 https://codepen.io/mmis1000/pen/gOgKqba?editors=0010 Or probably you can do it the reverse the obfuscate the selected text and make it actually works like a black pen. Although it will be definitely more complex because selection may cross multi text nodes. But the idea should apply.
- Vinnl 4y agoYeah, I was initially thinking block-level elements, but just selected text should be easier.