Last active
August 29, 2015 14:28
-
-
Save thomsbg/1ce62b6d15705c99147b to your computer and use it in GitHub Desktop.
pullquote quill format
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
{ | |
type: 'embed', | |
tag: 'IFRAME', | |
add: function(node, data) { | |
node.classList.add('pullquote'); | |
node.setAttribute('data-pullquote', data.value); | |
node.setAttribute('src', '/iframe/pullquote.html'); | |
return node; | |
}, | |
remove: function(node) { | |
node.classList.remove('pullquote'); | |
node.removeAttribute('data-pullquote'); | |
node.setAttribute('src', '/iframe/pullquote.html'); | |
return node; | |
}, | |
value: function(node) { | |
return { value: node.dataset.pullquote }; | |
}, | |
match: function(node) { | |
return node.tagName === 'IFRAME' && node.classList.contains('pullquote'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment