WP-Syntax Button is a WordPress plugin designed to work with WP-Syntax (http://wordpress.org/extend/plugins/wp-syntax/). It is in fact a copy/paste of CodeColorer TinyMCE Button adapted for wp-syntax, but it takes in consideration that wp-syntax allows you to specify the first line number.
This plugin also corrects a disagreement when switching editor mode. When you use wp-syntax you have to write in HTML editor since line argument is removed by Visual Editor… This is no longer the case.
Note that now, you « must » write your code in Visual Editor : the plugin automatically adds escaped="true" to <pre> tag. If you write your code in HTML editor, you have to encode HTML entities.
Usefull links :
Please use comments to let me know about any issue you may encounter, to propose improvements, or just to comment.
Comments (8)
Thanks
[...] WP-Syntax Button : ajoute un bouton à l’éditeur WYSIWYG pour formatter du code source avec WP-syntax [...]
This is a great plugin!
I have a feature request. When I clicked the code button I expected to have a textbox where I could paste my code.
Perhaps if nothing is selected in the editor could there be a textbox above the language selector where I can paste in the code I want?
Hi, thanks for your comment !
I agree with the fact that this plugin is very week functionnality. Actually, I didn’t really intend to really developp the plugin (i.e add features) since I’m a very poor JS developper… Therefore, I’m not really sure I’m able to do what you describe…
This is a minimalist plugin, it does only what I wanted it to do (I first adapted it for my own use before I decided to share it).
I’m not saying I won’t improve it, just that I’m not sure to be able to ^^
I really love your plugin!! Works very well for me!
Cheer up! Keep updating!! We all support you!!
Nice plugin. This is what I have been looking for. I have been using WP-Syntax plugin and faced the problem regarding the « line » and « escaped » tag inside the « < pre> » tag, especially when switch from HTML to Visual tab and back again to HTML tab, the editor removed both « line » and « escaped » tags. After using your plugin, this problem has been fixed. Thanks again.
[...] zum Einsatz. Um dann nicht immer den kompletten Quelltext tippen zu müssen, habe ich zum anderen WP-Syntax Button dazu installiert. Das ergänzt den Editor mit einem Code-Button. Um nun eine Zeile hervorzuheben, [...]
[...] WP-Syntax Button [...]