Wednesday, December 24, 2003 1:02 PM Christopher

PostModern Crossroads

Okay, I'm pretty solid on the HtmlEditor that I'm going to use for my little side project. It's a sweet editor. Honestly, it has more features than I think are necessary in this case, but that's okay with me.

On to the topic at hand. Originally, I spec'ed the Codify option to be in a dialog because that seemed like a nice tradeoff. I also tried a method that would allow you to either type code into the design surface or copy/paste it from your favorite editor, click a button, and bam! it's formatted. Seems like a winner, but the problem is that when you copy/paste into the editor, you lose tabs/spaces.

So how would you like it to work?

Comments

# re: PostModern Crossroads

Friday, December 26, 2003 2:16 PM by Shannon J Hager

Why does it lose the tabs and spaces? That seems like a good way to do it except for that problem. Is it due to the dialog or the paste operation?

# re: PostModern Crossroads

Friday, December 26, 2003 2:53 PM by Chris Frazier

It's gotta be the paste operation. If you look into the html directly after the paste, every single line is surrounded by [p] elements, which is the default.

Every line starts @ column 1 which really makes sense in the context of mshtml. Would it be too invasive to directly modify the ClipboardData to make sure that the code snippet comes in correctly formatted? To me, it seems like it would.

So far, the dialog seems to be winning simply because the tabs/spaces are not lost with it. The only drawback is that it puts the user thru one more step.

# re: PostModern Crossroads

Saturday, December 27, 2003 6:00 AM by Shannon J Hager

if the dialog is for pasting code, I don't think it is a problem. I think putting source code into a notepad is closer to "normal" than putting it into an HTML editor. I've personally never gotten used to that.

# re: PostModern Crossroads

Monday, December 29, 2003 11:39 AM by Chris Frazier

Awesome. Thanks so much for your feedback, Shannon.

Leave a Comment

(required) 
(required) 
(optional)
(required)