Skip to content

Commit

Permalink
Add missing 's' tag to html to pdf (#3898)
Browse files Browse the repository at this point in the history
  • Loading branch information
reiterl authored Jul 19, 2024
1 parent ef2b272 commit cbfb05c
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export class HtmlToPdfService {
h6: [`font-size:10`],
a: [`color:blue`, `text-decoration:underline`],
strike: [`text-decoration:line-through`],
s: [`text-decoration:line-through`],
// Pretty specific stuff that might be excluded for other projects than OpenSlides
del: [`color:red`, `text-decoration:line-through`],
ins: [`color:green`, `text-decoration:underline`]
Expand Down Expand Up @@ -103,6 +104,9 @@ export class HtmlToPdfService {
public convertHtml({ htmlText }: { htmlText: string }): Content[] {
const docDef = [];

// DEBUG: printing htmlText. Do not remove, just comment out
// console.log('MakePDF htmlText:\n---\n', htmlText, '\n---\n');

// Create a HTML DOM tree out of html string
const parser = new DOMParser();
const parsedHtml = parser.parseFromString(htmlText, `text/html`);
Expand Down Expand Up @@ -188,6 +192,7 @@ export class HtmlToPdfService {
case `i`:
case `ins`:
case `del`:
case `s`:
case `strike`: {
newParagraph = this.createFormattedParagraph(createPayload);
break;
Expand Down

0 comments on commit cbfb05c

Please sign in to comment.