htmldelphieditorhtml-editor

How to prevent Delphi html editor breaking lines?


I am trying to edit some HTML code in Delphi Sydney IDE (checked also with Tokyo). There are some mischiefs that make the IDE less than ideal for editing HTML. One in particular drives me crazy: the editor breaks MOST of the lines in two. Like:

<li><a href="x.html">x</a></li>

results in:

      <li><a href="x.html">x
</a></li>

Any idea what to configure in "options" to make the IDE behave?

I guess, if one is ready to give up editing the file manually, and use the IDE editor only in WYSIWYG mode, then it is fine. But I am not. Maybe later I want to edit the file also manually.


Update: How to test it?
@Dsm - Save this StackOverflow page. Open the page in Delphi IDE. While in WYSIWYG mode, make one single change (put a blank space). Save the page. Compare the original page with the newly saved page in the BeyondCompare diff tool. The diff tool will be all red because the two files are now totally different (247 differences it says).


Update:
Forget about it! The so-called "html editor" is beyond useless. NOTHING works. It is plagued with bugs all over! I spent 40 minutes to bring to date an old HTML page. Then I clicked another tab. When I returned to that page, all the changes were gone. Yes, every-time you switch away from an HTML page, the edits are lost.
Many things are just sloppy in Delphi IDE. This one is beyond sloppy!

@RemyLebeau - I apologize! You were right. This is NOT an HTML editor.


Solution

  • If you don't like Delphi editor to automatically adds new code indents then you should disable this in Delphi options.

    You can do this by opening Delphi options through Tools->Options menu, and then move to User Interface->Editor Options->Source Options

    Here you can change Source file type to HTML so you can make changes that affect only HTML files opened in Delphi editor:

    IDE Editor Source Options