Skip to content

Instantly share code, notes, and snippets.

@nozpheratu
Last active December 11, 2015 03:48
Show Gist options
  • Save nozpheratu/4539911 to your computer and use it in GitHub Desktop.
Save nozpheratu/4539911 to your computer and use it in GitHub Desktop.
var Aloha = window.Aloha || ( window.Aloha = {} );
Aloha.settings =
{
contentHandler: {
insertHtml: ['word', 'generic', 'oembed', 'sanitize', 'videoembed'],
sanitize: "relaxed",
allows: {
// elements allowed in the content
elements: [
'a', 'abbr', 'b', 'blockquote', 'br', 'cite', 'code', 'dd', 'del', 'dl', 'dt', 'em',
'i', 'li', 'ol', 'p', 'pre', 'q', 'small', 'strike', 'strong', 'sub',
'sup', 'u', 'ul', 'iframe' ],
// attributes allowed for specific elements
attributes: {
'a' : ['href'],
'blockquote' : ['cite'],
'q' : ['cite'],
'abbr': ['title'],
'iframe': ['src', 'frameborder','allowfullscreen']
},
// protocols allowed for certain attributes of elements
protocols: {
'a' : {'href': ['ftp', 'http', 'https', 'mailto', '__relative__']},
'blockquote' : {'cite': ['http', 'https', '__relative__']},
'q' : {'cite': ['http', 'https', '__relative__']},
'iframe': {'src': ['http', 'https']}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment