CKEditor is commonly referred to fCKEDITOR, it is an excellent web editor, can support a variety of programming languages, more and more people use, how to use it under Linux web editor CKEditor it? Xiao Bian gave you about the method under Linux using CKEditor.
First, use:
1, is introduced ckeditor core file ckeditor.js
in the page "head" "script type = & ldquo; text /javascript & rdquo ; src=“ckeditor/ckeditor.js”"/script"
2. Insert the HTML control "textarea" in the place where the editor is used
"textarea id=“TextArea1” Cols=“20” rows=“2” class=“ckeditor”"/textarea
If it is an ASP.NET environment, you can also use the server-side control "TextBox"
"asp:TextBox ID=“tbContent” runat=“server” TextMode=“MultiLine" class=“ckeditor”"/asp:TextBox
Note that adding class=&ldquo to the control ;ckeditor”
3, replace the corresponding control with the editor code
"script type=“text/javascript”"
CKEDITOR.replace(‘TextArea1’);
//If it is a server-side control in the ASP.NET environment "TextBox"
CKEDITOR.replace(‘tbContent’);
//If The TextBox control is in the master page, so write
CKEDITOR.replace(‘"%=tbContent.ClientID.Replace(“_”,“$”) %"’);
"/script"
4, configuration editor
ckeditor configuration is concentrated in the ckeditor /config.js file, the following are some commonly used configuration parameters: Br>
//interface language, default is ‘en’
config.language = ‘zh-cn’;
//set width and height
Config.width = 400;
config.height = 400;
//Editor styles, there are three types: ‘kama’(default), ‘office2003&rsq Uo;,‘v2’
config.skin = ‘v2’;
//Background color
config.uiColor = ‘#FFF’;
//Toolbar (Basic & lsquo;Basic& rsquo;, Almighty & lsquo;Full & rsquo;, Custom) plugins/toolbar/plugin.js
config.toolbar = ‘Basic’;
config.toolbar = ‘Full’;
This will work with:
config.toolbar_Full = [
[‘Source’,‘-’, & lsquo; Save & rsquo;, & lsquo; NewPage & rsquo;, & lsquo; Preview & rsquo;, & lsquo; - & rsquo;, & lsquo; Templates & rsquo;],
[& lsquo; Cut & rsquo;, & lsquo; Copy & rsquo;, & lsquo; Paste & rsquo;, & lsquo ;PasteText’,‘PasteFromWord’,‘-’,‘Print’, ‘SpellChecker’, ‘Scayt’],
[‘Undo’,‘Redo’,‘ - & rsquo;, & lsquo; Find & rsquo;, & lsquo; Replace & rsquo;, & lsquo; - & rsquo;, & lsquo; SelectAll & r Squo;,‘RemoveFormat’],
[‘Form’, ‘Checkbox’, ‘Radio’, ‘TextField’, ‘Textarea’, ‘Select’, ‘Button’ , ‘ImageButton’, ‘HiddenField’],
‘/’,
[‘Bold’,‘Italic’,‘Underline’,‘Strike’ , & lsquo; - & rsquo;, & lsquo; Subscript & rsquo;, & lsquo; Superscript & rsquo;],
[& lsquo; NumberedList & rsquo;, & lsquo; BulletedList & rsquo;, & lsquo; - & rsquo;, & lsquo; Outdent & rsquo;, & lsquo; Indent & rsquo; , & lsquo; Blockquote & rsquo;],
[& lsquo; JustifyLeft & rsquo;, & lsquo; JustifyCenter & rsquo;, & lsquo; JustifyRight & rsquo;, & lsquo; JustifyBlock & rsquo;],
[& lsquo; Link & rsquo;, & lsquo; Unlink & rsquo ;,‘Anchor’],
[‘Image’,‘Flash’,‘Table’,‘HorizontalR Ule’,‘Smiley’,‘SpecialChar’,‘PageBreak’],
‘/’,
[‘Styles’,‘Format’,‘ Font’,‘FontSize’],
[‘TextColor’,‘BGColor’]
];
//Can the toolbar be shrunk
>
config.toolbarCanCollapse = true;
//Location of the toolbar
config.toolbarLocation = ‘top’;//Optional:bottom
//Toolbar is expanded by default
config.toolbarStartupExpanded = true;
//Cancel & drag"Drag to change size" function plugins/resize/plugin.js
Config.resize_enabled = false;
//Change the maximum height of the size
config.resize_maxHeight = 3000;
//Change the maximum width of the size
config.resize_maxWidth = 3000;
//Change the minimum height of the size
config.resize_min Height = 250;
//Minimum size to change size
config.resize_minWidth = 750;
//Whether it is automatically submitted when submitting a form containing this editor Update the data inside the element
config.autoUpdateElement = true;
//Set whether to use absolute or relative directory, empty to relative directory
config.baseHref = &lsquo ;’
//The z-index value of the editor
config.baseFloatZIndex = 10000;
//Set the shortcut key
Previous1234Next Page total 4 pages
Multiple shells can be opened at the same time in Linux, but there can only be one running shell. So
GIT has replaced SVN for most Linux users because of its more convenient operation. However, in the
Linux rdate command is mainly used to display the date and time of other hosts, to achieve time sync
Delete files under Linux can be completed using the rm command. Then, which command
Ubuntu 12.04 system boot space is insufficient to delete the old kernel
What should I do if the NIC cannot be started after the Linux virtual machine is cloned?
Linux System Tmux Installation and Usage Guide
How Ubuntu builds virtual network card
How to install and configure DenyHosts tool
How Linux uses Sysdig to troubleshoot system faults
Linux uses Shellscript to install the NIC driver instance
Linux system how to use the crond command
How to install virtualization tools in Linux llibvirt
How Linux looks at the last reboot time
How to delete the input method that comes with Win7?
How to set the clock inside the win7 taskbar
What should I do if there is a problem with the Win8 application?
How to set up Win10 virtual memory Graphic tutorial
How Win8 uses the "system refresh" and "system reset" functions
Win8 built-in program updated again
How to delete one of the Win7 and Win8 dual systems?
Traffic Monitoring and Restriction in Windows Server 2008
What should I do if the win10 preview version 10061 cannot be activated after upgrading?