How to write this tpl file?

there are three lines in the template

    <textarea  id="content" readonly="readonly">
        {$results}
    </textarea> 
    

it looks good. Here comes the problem. When textarea is displayed, four spaces will appear in the front of the line.
solution 1:

    <textarea  id="content" readonly="readonly">{$results}
    </textarea> 
    

solution 2:
use js to read the innerHTML of textarea, and then use replace to remove the first space.

I don"t think either of these methods is very good. Is there the best way?

Mar.30,2022

indicates that your results has four space characters. Process the data first, and then replace the template.

Menu