Commit ccc559fc authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Add markdown parsing for texts from the API

parent cb388edd
import m from 'mithril';
import marked from 'marked';
import * as EmailValidator from 'email-validator';
import * as events from '../../models/events';
import { log } from '../../models/log';
......@@ -150,7 +151,7 @@ export default class EventDetails {
m('span', events.getSelectedEvent().time_start),
m('span', events.getSelectedEvent().signup_count),
m('span', events.getSelectedEvent().spots),
m('p', events.getSelectedEvent().description_de),
m('p', m.trust(marked(events.getSelectedEvent().description_de))),
eventSignupForm,
]);
}
......
import m from 'mithril';
import marked from 'marked';
import { apiUrl } from '../../models/config';
import * as jobs from '../../models/joboffers';
import { log } from '../../models/log';
......@@ -19,7 +20,7 @@ export default class JobOfferDetails {
return m('div', [
m('h1', jobOffer.title),
m('img', { src: `${apiUrl}${jobOffer.logo.file}`, alt: jobOffer.company }),
m('p', jobOffer.description),
m('p', m.trust(marked(jobOffer.description))),
m('a', { href: `${apiUrl}${jobOffer.pdf.file}`, target: '_blank' }, 'Download as PDF'),
]);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment