i think the insert code function is working ok, but for the CSS content, there might be an issue either with the css SyntaxHighlighter brush or just with the class value that gets set on the pre tag when css is the code type selected.
The class name assigned to the pre tag for css code in the threads posts is 'css ' - note the trailing space. None of the other code types have this trailing space. If i use the ie debugger to replace the class with 'css' without that trailing space on
the code pre tag and then i manually run the javascript method:
dp.SyntaxHighlighter.HighlightAll('code');
then the css code in your post is suddenly syntax highlighted.
i think the insert code function is working ok, but for the CSS content, there might be an issue either with the css SyntaxHighlighter brush or just with the class value that gets set on the pre tag when css is the code type selected.
The class name assigned to the pre tag for css code in the threads posts is 'css ' - note the trailing space. None of the other code types have this trailing space. If i use the ie debugger to replace the class with 'css' without that trailing space on
the code pre tag and then i manually run the javascript method:
dp.SyntaxHighlighter.HighlightAll('code');
then the css code in your post is suddenly syntax highlighted.
Thank you for your analysis, Mike! I've added this to the
known issues.
Possibly this is a latent bug in the 1.5 version of the syntaxhighlighter that will self correct when you can get to version 2.0?
In the interim, for anybody wanting to use the css syntax highlighting, just use the code paste as normal and select the css option. but, before hitting the "Post" button, click the html button in the editor and fix the class name on the "pre" tag.
// The number of elements contained in the matched element set
size: function() {
/// <summary>
/// The number of elements currently matched.
/// Part of Core
/// </summary>
/// <returns type="Number" />
return this.length;
},
Grz, Kris.
Read my blog | Twitter Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
Stack<int> intStack = new Stack<int>();
Dictionary<string, string> dictionary = new Dictionary<string, string>();
public void MyGenericMethod(T x, T y)
{
Console.Writeline("Parameters type is {0}", typeof(T));
}
mbanavige
All-Star
135167 Points
15505 Posts
ASPInsiders
Moderator
MVP
Re: Source Code examples
Jun 24, 2009 10:37 PM|LINK
i think the insert code function is working ok, but for the CSS content, there might be an issue either with the css SyntaxHighlighter brush or just with the class value that gets set on the pre tag when css is the code type selected.
The class name assigned to the pre tag for css code in the threads posts is 'css ' - note the trailing space. None of the other code types have this trailing space. If i use the ie debugger to replace the class with 'css' without that trailing space on the code pre tag and then i manually run the javascript method:
dp.SyntaxHighlighter.HighlightAll('code');
then the css code in your post is suddenly syntax highlighted.
tmorton
All-Star
56556 Points
9751 Posts
ASPInsiders
Moderator
Re: Source Code examples
Jun 25, 2009 12:55 AM|LINK
Thank you for your analysis, Mike! I've added this to the known issues.
ASP.NET/IIS.NET Website Manager, Neudesic
mbanavige
All-Star
135167 Points
15505 Posts
ASPInsiders
Moderator
MVP
Re: Source Code examples
Jun 25, 2009 01:15 AM|LINK
Possibly this is a latent bug in the 1.5 version of the syntaxhighlighter that will self correct when you can get to version 2.0?
In the interim, for anybody wanting to use the css syntax highlighting, just use the code paste as normal and select the css option. but, before hitting the "Post" button, click the html button in the editor and fix the class name on the "pre" tag.
Locate this html:
XIII
All-Star
182787 Points
23484 Posts
ASPInsiders
Moderator
MVP
Re: Source Code examples
Jun 27, 2009 02:55 PM|LINK
Trying it from Chrome and some javascript:
// The number of elements contained in the matched element set size: function() { /// <summary> /// The number of elements currently matched. /// Part of Core /// </summary> /// <returns type="Number" /> return this.length; },Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
SGWellens
All-Star
126033 Points
10311 Posts
Moderator
Re: Source Code examples
Jun 27, 2009 04:36 PM|LINK
I found a minor glitch (the characters are processed):
Raw:
<asp:TreeView ID="TreeView1" runat="server">
<Nodes>
<asp:TreeNode Text="My 'tabbed' Node" Value="1"></asp:TreeNode>
<asp:TreeNode Text="my css <span style='left:500px;position:absolute'>node</span>" Value="2"></asp:TreeNode>
</Nodes>
</asp:TreeView>
Formatted:
<asp:TreeView ID="TreeView1" runat="server"> <Nodes> <asp:TreeNode Text="My 'tabbed' Node" Value="1"></asp:TreeNode> <asp:TreeNode Text="my css <span style='left:500px;position:absolute'>node</span>" Value="2"></asp:TreeNode> </Nodes> </asp:TreeView>My blog
OthmaneRahmo...
Member
3 Points
1 Post
Microsoft
Re: Source Code examples
Jan 05, 2010 06:58 PM|LINK
test
Stack<int> intStack = new Stack<int>(); Dictionary<string, string> dictionary = new Dictionary<string, string>(); public void MyGenericMethod(T x, T y) { Console.Writeline("Parameters type is {0}", typeof(T)); }