asifshaon / syntaxhighlighter

Automatically exported from code.google.com/p/syntaxhighlighter
GNU General Public License v3.0
0 stars 0 forks source link

Suggestions [from wordpress-plugin] #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Alex, there few little bugs present in your code.

1. The "name" element in your "pre" tag is not valid markup.
I would replace the "name" value in dp.sh.HighlightAll function 
with "title". That should take care of the problem. It works great in 
Wordpress, no problems with their WYSIWYG/code editor. However, I only 
tested the "pre" tag.

2. I did not have the time to check properly, but in Firefox 2.x, the 
toolbar is displayed randomly, in other words, sometime it shows, other 
time is not. It works fine in IE because it uses the clipboardData. The 
XML brush was added at the end the html page, like in your example.

3. There is no way you can customize the alternate row in CSS, it adds a 
dotted border in Javascript, plus an un-even space beween the alternate 
rows.

For now, I went back to 1.3 version. It works well, except the clipboard. 
You new version is written very well, the code is well aligned, wich is 
rare among developers. :)

I have a suggestion, while here. It would be better to use "code", instead 
of "pre", is more accurate for search engines sine 99% of the time people 
will display code inside.

Thanks for your great work. I gave you credit on my blog:
http://www.yqed.com/code/javascript/syntax-highlighter-installed.html

Original issue reported on code.google.com by ad...@yqed.com on 10 Jun 2007 at 8:15

GoogleCodeExporter commented 9 years ago
Sorry about the title.
At least I feel better that I'm not the only one... :)

Original comment by ad...@yqed.com on 10 Jun 2007 at 8:18

GoogleCodeExporter commented 9 years ago
As per the suggestion of using "title" over name, I would suggest using "class" 
with
a space between instead.

<pre class="code java">

...for example.

Original comment by BrendonKoz on 20 Jun 2007 at 12:39

GoogleCodeExporter commented 9 years ago
Issue #2 is might be issue #19 I just posted about.

Original comment by u1_goo...@dslr.net on 5 Jul 2007 at 12:57

GoogleCodeExporter commented 9 years ago
Ugh sorry, Point number 2 here, might be issue #19 i just posted.

Original comment by u1_goo...@dslr.net on 5 Jul 2007 at 12:58

GoogleCodeExporter commented 9 years ago
Thanks for the fix, u1. :)
Will try it one more time tonight, I like better 1.5 because is tableless.

Original comment by ad...@yqed.com on 10 Jul 2007 at 2:17

GoogleCodeExporter commented 9 years ago

Original comment by docw...@gmail.com on 19 Oct 2007 at 8:12

GoogleCodeExporter commented 9 years ago
second on that.
check for XHTML compliance is in order

Original comment by serge....@gmail.com on 20 May 2008 at 4:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Using <pre name="code" /> makes it impossible to use the "Visual Mode" in the 
Wysiwyg editor.
This 'name' attribute is removed every time you switch between Visual and HTML 
mode, breaking the display.

How do I work around this?

Original comment by god...@gmail.com on 21 Feb 2009 at 4:38

GoogleCodeExporter commented 9 years ago
yes, I have also found this problem. I have just transferred my blog from 
blogger to
wordpress and it broke spacing on almost all code. So need to visit all posts
wherever I have script. 

but this name="code" bug has created difficult. when i just save old imported 
post in
Visual editor then all spacing looks correct. SO ,I need visual editor very 
much. 

Original comment by satya61...@gmail.com on 20 Sep 2009 at 2:10

GoogleCodeExporter commented 9 years ago
I'm using Tiny MCE online editor and i had the same problem.
Just change one line on shCore.js file : 
find this line (Line number 145)
 => if(tags[i].getAttribute('name')==name )
and edit to
 => if(tags[i].getAttribute('name')==name || tags[i].getAttribute('title')==name)
You can apply an attribut "title" with an HTML PRE tag.
It works and i have no more problems.

Original comment by s.leherp...@gmail.com on 13 Oct 2009 at 3:44