-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
addHtml() through error when there is list inside the content #2077
Comments
Same issue for me. |
` WordSettings::setOutputEscapingEnabled(false);
$templateProcessor->setValue('lesson_learned', $htmlAsXml ); |
Same issue for me. |
我通过跟踪源代码发现如果你的HTML片段中存在ol或ul那么添加HTML片段到word时所提供的wraper必须从phpword对象生成。你必须像这样使用才能正确添加包含ol或ul的HTML片段。
|
我也有类似的使用需求,目前为止你已经实现把html转换为xml,接下来你应该使用replaceXmlBlock方法而不是setValue方法
replaceXmlBlock方法会直接用$xml替换掉$key所在的w:p。目前我的代码运行良好 |
I am storing html data in database from ckeditor , but when i try to wrtite in file , addHtml causing an error ,
here is the code :
$wordTable3 = new \PhpOffice\PhpWord\Element\Table();
$wordTable3->addRow();
$cell3 = $wordTable3->addCell();
Html::addHtml($cell3,$session_content);
here is the issue :
"Call to a member function addNumberingStyle() on null", exception: "Error",…}
exception: "Error"
file: "E:\xampp\htdocs\mis\vendor\phpoffice\phpword\src\PhpWord\Shared\Html.php"
line: 521
message: "Call to a member function addNumberingStyle() on null"
trace: [{function: "parseList", class: "PhpOffice\PhpWord\Shared\Html", type:
The text was updated successfully, but these errors were encountered: