Wednesday 31 January 2018

Posting Code to my blogs

For my own reference to add code to my blogs and not have it edited




Copy the code you want to display in the post

Open Simplecode 

Paste the code in the box and click on enter

Copy the resulting the code and you are done. Just paste the code in blog post to display the code as expected



Sample 1

Straight Paste

3
false
sound
Sound Card
sound
7
ensoniq1371
35 

From Simplecode

<Item>
<rasd:AddressOnParent>3</rasd:AddressOnParent>
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
<rasd:Caption>sound</rasd:Caption>
<rasd:Description>Sound Card</rasd:Description>
<rasd:ElementName>sound</rasd:ElementName>
<rasd:InstanceID>7</rasd:InstanceID>
<rasd:ResourceSubType>ensoniq1371</rasd:ResourceSubType>
<rasd:ResourceType>35</rasd:ResourceType>


Its adding the following
A tag called < code >
the < is replaced with & l t ;

Item

The  > is replaced with & g t ;
And a  < br  / >  added to the end of each line for a new line.



No comments: