Dubrovnik is pretty nice, a very old city part of UNESCO world heritage, but as people have said, you can see most of it in maybe two days.
After a visit to Dubrovnik, take a ferry from Dubrovnik to Split.
It takes almost a whole day to go between Dubrovnik and Split by ferry but you get to see the entire archipelago outside Croatia and it's so beautiful.
If you want, stay a night or two at one the islands on the way like Hvar or Korcula before continuing.
Split is also very nice with the large Diocletians palace (I don't think the spelling is all correct, but it's something like that).
In Split there is an international airport with flights to for example Frankfurt and Vienna if I remember correctly.
You can also take a train to Zagreb, the Croatian capital, and include a visit to the capital before flying out of Croatia.