The insert code looks pretty good. But the only thing ilooks odd is, If I insert a code and again I choose to insert code and on clcikiing of insert code in menu its displaying a box with already inserted code. It could have displayed empty code highlighting
box. Recently I answered a query where I inserted code in 3 places. All the times when I want to insert I need to clear the old inserted code. When i click insert code, Its populated with previously inserted code.
One more thing I observed is commenting style. See this...
'This is my first comment
Dim name as String
'This is my second comment
Dim age as Int
Did you see anything odd. Yes I just commented one line, but its commenting everything till it finds next single quote. Ok for better view I comment the second and fourth line. It displays pretty clear
'This is my first comment
'Dim name as String
'This is my second comment
'Dim age as Int
But what if user copy my code and try to execute? I am afraid evrything is commented
This seems to be a browser specific issue. For IE, the insert code text area always clears out for me each time i invoke it. But for Chrome, i get the same behavior you see with Firefox where the previous code is still in the textarea.
One more issue :(. When I insert code and once it is inserted I pressed enter. Now whatevr I am writing is going in code block. I am clickinh HTMl and editing my HTML again. This is the third issue I faced with insert code.
1. Clearing code everytime
2. Syntax highlighter issue - thanks to mike for Workaround
3. Incorrect format of text once code is entered
I always tap in a couple of extra [enters] then i uparrow before i paste in code. this insures theat the editor will have some regular <p> tags after the code block that i can type regular text into.
Also, so that i can see where the code blocks start/stop, i use a little extra css is my browser's user/accessibility stylesheet.
Hmm.. I wonder if the script behind the insert button in the insert code popup could be altered to include a trailing <p></p>. Then everybody would get a new empty non-code paragraph after each code paste.
Also, so that i can see where the code blocks start/stop, i use a little extra css is my browser's user/accessibility stylesheet.
Exactly. I can change my settings. But how the OP sees? It will be same juggled right? I am just continuing this thread so that a defect(s) will be noted and will be fixed in next deployment. Your idea of wrapping 'pre' in 'p' is good. If this could be done
in next phases, user feels great. The most annoying thing about code insert is, clearing. I always use Firefox. And it never cleared.
Also, so that i can see where the code blocks start/stop, i use a little extra css is my browser's user/accessibility stylesheet.
Exactly. I can change my settings. But how the OP sees? It will be same juggled right?
The little bit of accessibility css only appears for me - but it lets me see if i'm about to type regular text into a code block i just pasted. So it's just a visual aid for me to help me insure i dont add regular text to a code block. To insure that i
have some regular space to type some follow on text, i still need to tap in a couple of extra enters and scroll up before pasting code. if i dont do that - then yes, it would still be juggled for others viewing my post.
This seems to be a browser specific issue. For IE, the insert code text area always clears out for me each time i invoke it. But for Chrome, i get the same behavior you see with Firefox where the previous code is still in the textarea.
We do have this bug logged, but I don't have an ETA for a fix.
Contributor
6607 Points
1822 Posts
Insert Code issue...
Aug 05, 2011 01:46 AM|fayaz_3e|LINK
The insert code looks pretty good. But the only thing ilooks odd is, If I insert a code and again I choose to insert code and on clcikiing of insert code in menu its displaying a box with already inserted code. It could have displayed empty code highlighting box. Recently I answered a query where I inserted code in 3 places. All the times when I want to insert I need to clear the old inserted code. When i click insert code, Its populated with previously inserted code.
I use firefox.
Contributor
6607 Points
1822 Posts
Re: Insert Code issue...
Aug 09, 2011 08:15 PM|fayaz_3e|LINK
One more thing I observed is commenting style. See this...
Did you see anything odd. Yes I just commented one line, but its commenting everything till it finds next single quote. Ok for better view I comment the second and fourth line. It displays pretty clear
But what if user copy my code and try to execute? I am afraid evrything is commented
All-Star
159984 Points
13198 Posts
ASPInsiders
Moderator
Re: Insert Code issue...
Aug 09, 2011 08:57 PM|mbanavige|LINK
The issue with the VB commenting is related to the underlying prettify script being used (http://code.google.com/p/google-code-prettify/). Not quite sure if google has it on the prettify bug list but there are a few workarounds to the vb commenting issue posted here: http://meta.stackoverflow.com/questions/6812/vb-net-vbscript-syntax-highlighting-does-not-properly-support-comments
Contributor
6607 Points
1822 Posts
Re: Insert Code issue...
Aug 09, 2011 09:12 PM|fayaz_3e|LINK
Thanks Mike. I will do it for VB. But still the actual question is unanswered. Clearing code every time I want to insert, Its really annoying me :(
All-Star
159984 Points
13198 Posts
ASPInsiders
Moderator
Re: Insert Code issue...
Aug 09, 2011 09:24 PM|mbanavige|LINK
This seems to be a browser specific issue. For IE, the insert code text area always clears out for me each time i invoke it. But for Chrome, i get the same behavior you see with Firefox where the previous code is still in the textarea.
Contributor
6607 Points
1822 Posts
Re: Insert Code issue...
Aug 19, 2011 05:01 AM|fayaz_3e|LINK
One more issue :(. When I insert code and once it is inserted I pressed enter. Now whatevr I am writing is going in code block. I am clickinh HTMl and editing my HTML again. This is the third issue I faced with insert code.
1. Clearing code everytime
2. Syntax highlighter issue - thanks to mike for Workaround
3. Incorrect format of text once code is entered
All-Star
159984 Points
13198 Posts
ASPInsiders
Moderator
Re: Insert Code issue...
Aug 19, 2011 05:58 AM|mbanavige|LINK
I always tap in a couple of extra [enters] then i uparrow before i paste in code. this insures theat the editor will have some regular <p> tags after the code block that i can type regular text into.
Also, so that i can see where the code blocks start/stop, i use a little extra css is my browser's user/accessibility stylesheet.
Hmm.. I wonder if the script behind the insert button in the insert code popup could be altered to include a trailing <p></p>. Then everybody would get a new empty non-code paragraph after each code paste.
Contributor
6607 Points
1822 Posts
Re: Insert Code issue...
Aug 19, 2011 06:20 AM|fayaz_3e|LINK
All-Star
159984 Points
13198 Posts
ASPInsiders
Moderator
Re: Insert Code issue...
Sep 05, 2011 10:05 AM|mbanavige|LINK
The little bit of accessibility css only appears for me - but it lets me see if i'm about to type regular text into a code block i just pasted. So it's just a visual aid for me to help me insure i dont add regular text to a code block. To insure that i have some regular space to type some follow on text, i still need to tap in a couple of extra enters and scroll up before pasting code. if i dont do that - then yes, it would still be juggled for others viewing my post.
All-Star
163349 Points
9802 Posts
ASPInsiders
Dev Team
Moderator
Re: Insert Code issue...
Oct 20, 2011 11:37 AM|tmorton|LINK
We do have this bug logged, but I don't have an ETA for a fix.
ASP.NET Website Manager, Neudesic