Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for <s> tag when converting HTML to RichText #4223

Closed
8 tasks
m7913d opened this issue Nov 9, 2024 · 0 comments · Fixed by #4224
Closed
8 tasks

Add support for <s> tag when converting HTML to RichText #4223

m7913d opened this issue Nov 9, 2024 · 0 comments · Fixed by #4224

Comments

@m7913d
Copy link
Contributor

m7913d commented Nov 9, 2024

This is:

- [ ] a bug report
- [x] a feature request
- [x] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

<s> tag should be interpreted as strikethrough text, similar to the <del> tag.

What is the current behavior?

Text inside <s> tag is displayed as normal text.

What are the steps to reproduce?

<?php

require __DIR__.'vendor/autoload.php';

use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;

$spreadsheet = new Spreadsheet();
$activeWorksheet = $spreadsheet->getActiveSheet();
$input = 'Hello <s>test</s>world';
$html = new Html();
$richText = $html->toRichTextObject($input);
$activeWorksheet->setCellValue('A1', $richText);

$writer = new Xlsx($spreadsheet);
$writer->save('hello_world.xlsx');

What features do you think are causing the issue

  • Reader
  • Writer
  • Styles
  • Data Validations
  • Formula Calculations
  • Charts
  • AutoFilter
  • Form Elements

Does an issue affect all spreadsheet file formats? If not, which formats are affected?

All formats affected

Which versions of PhpSpreadsheet and PHP are affected?

All versions

m7913d added a commit to m7913d/PhpSpreadsheet that referenced this issue Nov 9, 2024
m7913d added a commit to m7913d/PhpSpreadsheet that referenced this issue Nov 9, 2024
m7913d added a commit to m7913d/PhpSpreadsheet that referenced this issue Nov 9, 2024
m7913d added a commit to m7913d/PhpSpreadsheet that referenced this issue Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant