vendredi 22 mai 2020

Undefined index: listdepth, When I am trying to add list Items using laravel with phpWord [duplicate]

I am using phpOffice with Laravel 5.3. I am new to phpOffice. I am using editor to add a template as input.

When I tried to add list (ordered or numbered) items, It is giving error "Undefined index: listdepth".

    Sample Input : 


 1. List item 1
 2. List item 2
 3. List item 3
 4. List item 4
 5. List item 5
     - B
     - C
     - Z
     - e
     - f
     - g
     - h

method where the error is showing :

protected static function parseListItem($node, $element, &$styles, $data)
{
    $cNodes = $node->childNodes;
    if (!empty($cNodes)) {
        $listRun = $element->addListItemRun($data['listdepth'], $styles['list'], $styles['paragraph']);
        foreach ($cNodes as $cNode) {
            self::parseNode($cNode, $listRun, $styles, $data);
        }
    }
}


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2zYiixh
via IFTTT

Aucun commentaire:

Enregistrer un commentaire