WebContent/assets/lib/ckeditor/plugins/pbckcode/README.md
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
# pbckcode
A CKEditor plugin to easily add code into your articles.
The plugin will create a dialog where you will be able to format your code as your will. When you press the **OK** button, the plugin will create a *pre* tag with your code inside.
# Demo
See it in action ! http://prbaron.github.com/pbckcode/
# Installation
1. Download the plugin from the Github repository : [https://github.com/prbaron/pbckcode/tags](https://github.com/prbaron/pbckcode/tags)
2. Rename it to **pbckcode** (it will be easier to call it into CKEditor)
3. Place the folder into the plugins folder of CKEditor ( *{Path to CKEDitor}/plugins/* )
4. Open the config.js file and add the following lines :
```
CKEDITOR.editorConfig = function( config ) {
// CKEDITOR TOOLBAR CUSTOMIZATION
// I only set the needed buttons, so feel frey to add those you want in the array
config.toolbarGroups = [
{ name: 'pbckcode' } ,
// you other buttons here
];
// CKEDITOR PLUGINS LOADING
config.extraPlugins = 'pbckcode'; // add other plugins here (comma separated)
// ADVANCED CONTENT FILTER (ACF)
// ACF protects your CKEditor instance of adding unofficial tags
// however it strips out the pre tag of pbckcode plugin
// add this rule to enable it, useful when you want to re edit a post
config.allowedContent= 'pre[*]{*}(*)'; // add other rules here
// PBCKCODE CUSTOMIZATION
config.pbckcode = {
// An optional class to your pre tag.
cls : '',
// The syntax highlighter you will use in the output view
highlighter : 'PRETTIFY',
// An array of the available modes for you plugin.
// The key corresponds to the string shown in the select tag.
// The value correspond to the loaded file for ACE Editor.
modes : [ ['HTML', 'html'], ['CSS', 'css'], ['PHP', 'php'], ['JS', 'javascript'] ],
// The theme of the ACE Editor of the plugin.
theme : 'textmate',
// Tab indentation (in spaces)
tab_size : '4'
};
};
```
And you are good to go! You will have the same configuration than the demo.
# Options
## highlighter
后面还有 114 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。