Autor Beitrag
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 15.01.06 22:15 
Man Lernt nicht Aus. Respekt!!!!
Lars B. Threadstarter
Hält's aus hier
Beiträge: 13



BeitragVerfasst: So 15.01.06 22:23 
So damit gehts :)
ausblenden Delphi-Quelltext
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..28of 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) >0then
     begin
      if (pos(TagList[i],dummy)<>0)and(pos(TagList[i+1],dummy)=0then
       begin
        dummy:=dummy+TagList[i+1];
        M_Editor.Lines[count]:=dummy;
       end;
     end;
    end{for2}
  end;
end;