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

addListItem does not support styling (/runs) #505

Closed
kernle32dll opened this issue Mar 18, 2015 · 1 comment
Closed

addListItem does not support styling (/runs) #505

kernle32dll opened this issue Mar 18, 2015 · 1 comment

Comments

@kernle32dll
Copy link

addListItem just accepts text as an input. But it should be possible to create styled list items.

I suggest to add a method addListRun, that behaves as addTextRun does. This allows to create styled list items (e.g. with links or other cool stuff in them), and at the same time keeps the API in terms of addListItem intact.

For example:

$section = $phpWord->addSection();
$list = $section->addListRun($depth, $listStyle, $paragraphStyle);

$list->addText('We present you: ');
$list->addLink('http:https://www.google.de', 'awesome link is awesome');
@kernle32dll
Copy link
Author

Never mind... I found it in the development branch. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant