Skip to content

Instantly share code, notes, and snippets.

@thomsbg
Last active August 29, 2015 14:28
Show Gist options
  • Save thomsbg/1ce62b6d15705c99147b to your computer and use it in GitHub Desktop.
Save thomsbg/1ce62b6d15705c99147b to your computer and use it in GitHub Desktop.
pullquote quill format
{
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