{"id":23,"date":"2008-01-06T23:06:03","date_gmt":"2008-01-07T03:06:03","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=23"},"modified":"2008-01-07T11:39:23","modified_gmt":"2008-01-07T15:39:23","slug":"install-codehighlighter","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=23","title":{"rendered":"Install CodeHighlighter"},"content":{"rendered":"<p>Installed CodeHighlighter plugin. Worked great.<\/p>\n<h4 _extended=\"true\">Usage<\/h4>\n<ol _extended=\"true\">\n<li _extended=\"true\">Put the code snippet to pre tag.<\/li>\n<li _extended=\"true\">Add the lang attribute to the pre tag like the following. <code _extended=\"true\"><font face=\"Courier New\" style=\"background-color: #ededff\">&lt;pre lang=\"cpp\"&gt;<\/font><\/code><\/li>\n<li _extended=\"true\">Add the lineno attribute to the pre tag after the lang tag like the following if you want to display line numbers. The number in the lineno tag becomes a start line number. There is no default value for the start line number. So you must supply the value to the lineno tag. <code _extended=\"true\"><font face=\"Courier New\" style=\"background-color: #ededff\">&lt;pre lang=\"cpp\" lineno=\"1\"&gt;<\/font><\/code><\/li>\n<li _extended=\"true\">If you do not add lang attribute, the pre tag is handled normally.<\/li>\n<li _extended=\"true\">If you want to have border, add the style like the following to your .css file. <code _extended=\"true\"><font face=\"Courier New\" style=\"background-color: #ededff\">pre { border: 1px dotted #ccc; padding: 0.2em 0.5em; }<\/font><\/code><\/li>\n<li _extended=\"true\">You can use following languages in lang. <code _extended=\"true\"><font face=\"Courier New\" style=\"background-color: #ededff\">actionscript, ada, apache, asm, asp, bash, c, c_mac, caddcl, cadlisp, cdfg, cpp, csharp, css, delphi, html4strict, java, javascript, lisp, lua, mpasm, nsis, objc, oobas, oracle8, pascal, perl, php, python, qbasic, sas, smarty, vb, vbnet, visualfoxpro, xml<\/font><\/code><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Installed CodeHighlighter plugin. Worked great. Usage Put the code snippet to pre tag. Add the lang attribute to the pre tag like the following. &lt;pre lang=&#8221;cpp&#8221;&gt; Add the lineno attribute to the pre tag after the lang tag like the &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=23\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-n","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23"}],"version-history":[{"count":0,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}