-
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
linebreak #384
Comments
no answer? |
$text = explode("\r\n", $text); |
Yes I did it temporary in my case, but is there any way phpword detect line-breaks itself? |
I'm very surprised the /**
* Create a new Text Element
*
* @param string $text
* @param mixed $fontStyle
* @param mixed $paragraphStyle
*/
public function __construct($text = null, $fontStyle = null, $paragraphStyle = null, $paragraphOnNewLine = null)
{
if(paragraphOnNewLine === null) {
$this->setText($text);
$paragraphStyle = $this->setParagraphStyle($paragraphStyle);
$this->setFontStyle($fontStyle, $paragraphStyle);
} else {
$text = preg_match('~(*BSR_ANYCRLF)\R~', $text);
foreach($text as $line) {
$foo = new addText($line, $fontStyle, $paragraphStyle);
$foo->setText($text);
$paragraphStyle = $foo->setParagraphStyle($paragraphStyle);
$foo->setFontStyle($fontStyle, $paragraphStyle);
}
} I would argue that a similar need has been expressed using Template mechanism (see : #268). |
there solutions to this issue , I have a similar problem |
this will insert a line break for each paragraph. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Hi,
How can i put long text with many line break in phpword?
is it possible to use str_replace function to replace " \r\n " with any meaningful xml tag?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: