Archive

Posts Tagged ‘wp-codebox’

Visual Code Editor with WP-Codebox

January 26th, 2009

This is a test using the Visual Code Editor plugin with the WP-CodeBox plugin.

Original code:

	<Tr>
		<td style="background-color:##598CB5;color:white;font-weight:bold;">
			#l1title#
		</td>
		<td rowspan=16>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td style="background-color:##598CB5;color:white;font-weight:bold;">
			#r1title#
		</td>
	</tr>
<!--- ORDER --->
<cfhttpparam name="x_invoice_num"         type="formfield" value="#invoice_num#" >
<cfhttpparam name="x_description"         type="formfield" value="ScenicMesa.com online order">
<cfloop list="#x_line_items#" delimiters="#chr(9)#" index="i">
	<cfhttpparam name="x_line_item"       type="formfield" value="#i#">
</cfloop>

And here is WP-CodeBox enabled:

Rendering of WP-Codebox

Rendering of WP-Codebox - I took this screen capture just before turning deactivating the plugin.

Visual Code Edior allows for syntax and code editing right in WordPress’ invocation of TinyMCE. Therefore, all html entitied are escaped. As you can see this sometimes does not work with WP-CodeBox since it expects non-escaped code. This is why WP-CodeBox made it on my “Plugins that failed to help” list.

Now for SyntaxHighlighter Plus, which, on the other hand expects escaped code. And so it works well when editing code in visual mode of the WordPress post editor:

	<Tr>
		<td style="background-color:##598CB5;color:white;font-weight:bold;">
			#l1title#
		</td>
		<td rowspan=16>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td style="background-color:##598CB5;color:white;font-weight:bold;">
			#r1title#
		</td>
	</tr><!--- ORDER --->
<cfhttpparam name="x_invoice_num"         type="formfield" value="#invoice_num#" >
<cfhttpparam name="x_description"         type="formfield" value="ScenicMesa.com online order">
<cfloop list="#x_line_items#" delimiters="#chr(9)#" index="i">
	<cfhttpparam name="x_line_item"       type="formfield" value="#i#">
</cfloop>

Visual Code Editor , ,