'///HTML: Convert SelectedText to '<ul> ... </ul>' structure
// Version: 2.0 (2010.06.22)

Text = Trim(AkelPad.GetSelText())

'Определение разделителей
If instr(1, Text, ";") > 0 Then
   Separator = ";"
   Sep = ";"
Else
   Separator = chr(13)
End If

ARR = Split(Text, Separator)

For i = 0 to ubound(ARR)
   If i = ubound(ARR) Then Sep = ""

   ARR(i) = LTrim(ARR(i))
   If Left(ARR(i), 1) = chr(13) then
      ARR(i) = "   <li>" + mid(ARR(i), 2) + Sep + "</li>" + chr(13)
   Else
      ARR(i) = "   <li>" + ARR(i) + Sep + "</li>" + chr(13)
   End If
Next

If Text <> "" then Text = Join(ARR, "") Else Text = "   <li> </li>" + chr(13)

Call AkelPad.ReplaceSel("<ul>" + chr(13) + Text + "</ul>")