您的位置:首页 > 其它

CodeColorer 使用-WordPress

2017-03-26 10:30 92 查看
如需添加Code, 需要禁用可视化,否则会被自动修改.

使用方法<code lang=”perl” line_numbers=”true” tab_size=”2”> </code>

其他参数,可能不是很常用:

lang (string) – source language.

tab_size (integer) – how many spaces would represent TAB symbol.

line_numbers (boolean) – when true line numbers will be added.

first_line (integer) – a number of the first line in the block.

highlight (string) – a comma-separated list of line numbers to highlight (e.g.
1,5,8,9
).

no_links (boolean) – when false keywords will be represented as links to manual.

lines (integer) – how many lines would be block height without scroll; could be set to -1 to remove vertical scrollbar.

width (integer or string) – block width.

height (integer or string) – height in pixels; used when lines number is greater then “lines” value.

rss_width (integer or string) – block width in RSS feeds.

theme (string) – color theme (default, blackboard, dawn, mac-classic, twitlight, vibrant).

inline (boolean) – when true forces code block to render inside
<code></code>
tag. Used to paste a single line of code into the regular text.

strict (boolean) – when true strict mode will be enabled. By default CodeColorer tries to guess whether strict mode is needed, so this option allows to force it on or off when automatic suggestion is wrong.

nowrap (boolean) – when false no horizontal scrollbar will be shown; instead code will be wrapped in the end of code box.

noborder (boolean) – when true no border will be shown around the code block.

no_cc (boolean) – when true the syntax in code block will not be highlighted, code will be rendered inside
<code></code>
tag.

class (string) – additional CSS classes to add to the wrapper HTML element.

参考网页: https://kpumuk.info/projects/wordpress-plugins/codecolorer/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  oc wordpress