[wp-testers] Code Kvetching

Rick Beckman rick.beckman at gmail.com
Tue May 6 03:10:49 GMT 2008


I could post this on the Kvetch site, but I like the possibility of
feedback...

1) WordPress' default installation of TinyMCE provides no easy way of
semantically marking up inline code using (X)HTML's CODE tag. Marking up
code should be trivially easy in WordPress given its importance to the open
source community.

2) WordPress is inconsistent about which entities are preserved when marking
up code. Quotes remain straight, triple dots aren't converted to ellipses,
and ampersands are properly escaped... but things like double-dashes (--)
are still typographically altered, which results in broken code being
output. Between CODE tags, NO character substitution should be taking place,
save for the proper escaping of &, <, and > to preserve (X)HTML validity.

--


TinyMCE already provides an easy way of inserting preformatted blocks of
text, which is great for, say, posting snippets of uniquely arranged poetry,
guitar tablature or chords, and so on, but it does not semantically denote
code, nor does it help at all with inserting inline code. Properly marked up
blocks of code require both a PRE (to preserve spacing) and CODE (to add
semantic meaning); marking up code like this in WordPress ought to be idiot
proof.

--

Regarding plugin solutions already given (adding a button via
TinyMCE-Advanced or adding a shortcode via Code Shortcode), both fail to
(completely) address #2.

In the Visual Editor, things aren't really WYSIWYG -- quote marks and an
array of other punctuation are prettified. Strings or blocks of CODE,
however, should truly be WYSIWYG.

My gratitude and a post on my blog showcasing the plugin to anyone who can
solve these problems.



-- 
Rick Beckman
http://rickbeckman.org/
http://fellowship-hall.com/


More information about the wp-testers mailing list