Opened 12 years ago

Closed 3 years ago

#1360 closed enhancement (wontfix)

Make automatic code indentation in source view mode configurable

Reported by: nicholasbs Owned by: gogo
Priority: normal Milestone: 0.97
Component: Xinha Core Version: trunk
Severity: normal Keywords:


It's been requested that Xinha's automatic code indentation in source view mode be made optional. I propose that we add a new Xinha configuration variable, indentMarkup (with a default value of true), to make this possible.

Looking at the code, this seems like it should be pretty trivial. One complication I can see is that we'll need to make changes to the getHtml methods in both DOMwalk and TransformInnerHTML.

In TransformInnerHTML, the relevant code is here:

html = Xinha.indent(html);

Commenting out the above should do the trick.

In DOMwalk, changing the following line to not increment indent solves half the problem:

html += Xinha.getHTMLWrapper(i, true, editor, indent + '  ');

...but DOMwalk will still insert newline characters all over the place, so a solution here will require a bit more thought.


Change History (1)

comment:1 Changed 3 years ago by gogo

  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.