| Issue 11: | Suggestions [from wordpress-plugin] | |
| 4 people starred this issue and may be notified of changes. | Back to list |
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 |
|
,
Jun 10, 2007
Sorry about the title. At least I feel better that I'm not the only one... :) |
|
,
Jun 19, 2007
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. |
|
,
Jul 04, 2007
Issue #2 is might be issue #19 I just posted about. |
|
,
Jul 04, 2007
Ugh sorry, Point number 2 here, might be issue #19 i just posted. |
|
,
Jul 10, 2007
Thanks for the fix, u1. :) Will try it one more time tonight, I like better 1.5 because is tableless. |
|
,
Oct 19, 2007
(No comment was entered for this change.)
Summary: Suggestions [from wordpress-plugin]
Cc: docwhat |
|
,
May 20, 2008
second on that. check for XHTML compliance is in order |
|
,
Feb 21, 2009
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? |
|
,
Sep 20, 2009
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. |
|
,
Oct 13, 2009
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.
|
|
|
|