Created
March 25, 2018 08:04
-
-
Save malikkurosaki/19bb9d52cbd70ffd0485b0787246b29a to your computer and use it in GitHub Desktop.
manipulating element text editor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
document.getSelection().getRangeAt(0).surroundContents(fff); // manipulating text element | |
window.getSelection().anchorNode.parentElement.classList.toggle("w3-red"); // manipulating prent element | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment