1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24:
| const TagList:array[1..28] of String = ('<b>','</b>','<i>','</i>','<u>','</u>', '<h1>','</h1>','<h2>','</h2>','<h3>','</h3>','<h4>','</h4>', '<h5>','</h5>','<table>','</table>','<tr>','</tr>','<td>', '</td>','<ul>','</ul>','<ol>','</ol>','<li>','</li>');
var i,count,index:Integer; dummy:String; begin for count:=0 to M_Editor.Lines.Count-1 do begin dummy:=M_Editor.Lines[count]; for i:=1 to 28 do begin if ((i mod 2) >0) then begin if (pos(TagList[i],dummy)<>0)and(pos(TagList[i+1],dummy)=0) then begin dummy:=dummy+TagList[i+1]; M_Editor.Lines[count]:=dummy; end; end; end; end; end; |