2017-06-26 13:24:55 -04:00
|
|
|
export function setup(helper) {
|
|
|
|
|
|
|
|
if (!helper.markdownIt) { return; }
|
|
|
|
|
|
|
|
// this is built in now
|
|
|
|
// TODO: sanitizer needs fixing, does not properly support this yet
|
2017-06-28 16:08:20 -04:00
|
|
|
|
|
|
|
// we need a custom callback for style handling
|
|
|
|
helper.whiteList({
|
|
|
|
custom: function(tag,attr,val) {
|
|
|
|
if (tag !== 'th' && tag !== 'td') {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (attr !== 'style') {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (val === 'text-align:right' || val === 'text-align:left' || val === 'text-align:center');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-06-26 13:24:55 -04:00
|
|
|
helper.whiteList([
|
|
|
|
'table',
|
|
|
|
'tbody',
|
|
|
|
'thead',
|
|
|
|
'tr',
|
|
|
|
'th',
|
|
|
|
'td',
|
|
|
|
]);
|
|
|
|
}
|