TinyButStrong - the PHP Template Engine
Categories > TinyButStrong general >

remove all enters

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: zixxus
Date: 2014-10-03
Time: 21:41

remove all enters

if we can somehow trick in the code delete all enter?
as I wanted to do some tag is used this:

$TBS->Source = preg_replace("#\[\[tags]]#si", '
    </text:p>
    <text:p text:style-name="tags"></text:p>
           <text:p>
', $TBS->Source);

and now or in the same way I can erase the all enter?
By: Skrol29
Date: 2014-10-04
Time: 10:48

Re: remove all enters

You probably can.
OpenTBS let you change the current sub-file using $TBS->Source the way your are doing it.
Your change must be compatible with the document XML format.
By: zixxus
Date: 2014-10-04
Time: 12:40

Re: remove all enters

I know, and so it is only when something else will replace it work and when trying to replace
<text:p text:style-name="P6"/><text:p text:style-name="Standard"/>


what any it still does not work, and would like a simple way to delete all entery, you can some better idea?
By: zixxus
Date: 2014-10-05
Time: 16:34

Re: remove all enters



$TBS->Source = preg_replace('{<text:p text:style-name="P6"/>}', '', $TBS->Source);
$TBS->Source = preg_replace('{<text:p text:style-name="Standard"/>}', '', $TBS->Source);
$TBS->Source = preg_replace('{<text:p text:style-name="Text_20_body"/>}', '', $TBS->Source);


not work!!
By: Skrol29
Date: 2014-10-08
Time: 01:24

Re: remove all enters

It is not clear for me what you are trying to do.

> it still does not work

Is the string correctly replaced in the ODT result ?