1. 程式人生 > >CKEditor用法大全 實現編輯器預設為原始碼檢視

CKEditor用法大全 實現編輯器預設為原始碼檢視

一、使用方法:

更改編輯器預設為原始碼檢視

var editor1 = CKEDITOR.replace('<%=txtShowCode.ClientID%>', { skin: "kama", width: 780, height: 500,startupMode:"source"});



1、在頁面<head>中引入ckeditor核心檔案ckeditor.js 

< script type="text/javascript" src="ckeditor/ckeditor.js"></script> 

2、在使用編輯器的地方插入HTML控制元件<textarea> 

< textarea id="TextArea1" cols="20" rows="2" class="ckeditor"></textarea> 

如果是ASP.NET環境,也可用伺服器端控制元件<TextBox> 

< asp:TextBox ID="tbContent" runat="server" TextMode="MultiLine" class="ckeditor"></asp:TextBox> 

注意在控制元件中加上 class="ckeditor" 。 

3、將相應的控制元件替換成編輯器程式碼 

<script type="text/javascript"> 
CKEDITOR.replace('TextArea1'); 
//如果是在ASP.NET環境下用的伺服器端控制元件<TextBox> 
CKEDITOR.replace('tbContent'); 
//如果<TextBox>控制元件在母版頁中,要這樣寫 
CKEDITOR.replace('<%=tbContent.ClientID.Replace("_","$") %>'); 
< /script> 

4、配置編輯器 

ckeditor的配置都集中在 ckeditor/config.js 檔案中,下面是一些常用的配置引數: 

// 介面語言,預設為 'en' 

config.language = 'zh-cn'; 

// 設定寬高 

config.width = 400; 

config.height = 400; 

// 編輯器樣式,有三種:'kama'(預設)、'office2003'、'v2' 

config.skin = 'v2'; 

// 背景顏色 

config.uiColor = '#FFF'; 

// 工具欄(基礎'Basic'、全能'Full'、自定義):工具欄在editor.js 裡面 

config.toolbar = 'Basic'; 

config.toolbar = 'Full'; 

這將配合: 
config.toolbar_Full = [ 
['Source','-','Save','NewPage','Preview','-','Templates'], 
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'], 
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], 
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'], 
'/', 
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], 
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], 
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], 
['Link','Unlink','Anchor'], 
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'], 
'/', 
['Styles','Format','Font','FontSize'], 
['TextColor','BGColor'] 
]; 

//工具欄是否可以被收縮 
config.toolbarCanCollapse = true; 

//工具欄的位置 
config.toolbarLocation = 'top';//可選:bottom 

//工具欄預設是否展開 
config.toolbarStartupExpanded = true; 

// 取消 “拖拽以改變尺寸”功能 plugins/resize/plugin.js 
config.resize_enabled = false; 

//改變大小的最大高度 

config.resize_maxHeight = 3000; 

//改變大小的最大寬度 
config.resize_maxWidth = 3000; 

//改變大小的最小高度 
config.resize_minHeight = 250; 

//改變大小的最小寬度 
config.resize_minWidth = 750; 
// 當提交包含有此編輯器的表單時,是否自動更新元素內的資料 
config.autoUpdateElement = true; 

// 設定是使用絕對目錄還是相對目錄,為空為相對目錄 
config.baseHref = '' 

// 編輯器的z-index值 
config.baseFloatZIndex = 10000; 

//設定快捷鍵 
config.keystrokes = [ 
[ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ], //獲取焦點 
[ CKEDITOR.ALT + 122 /*F11*/, 'elementsPathFocus' ], //元素焦點 

[ CKEDITOR.SHIFT + 121 /*F10*/, 'contextMenu' ], //文字選單 

[ CKEDITOR.CTRL + 90 /*Z*/, 'undo' ], //撤銷 
[ CKEDITOR.CTRL + 89 /*Y*/, 'redo' ], //重做 
[ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 /*Z*/, 'redo' ], // 

[ CKEDITOR.CTRL + 76 /*L*/, 'link' ], //連結 

[ CKEDITOR.CTRL + 66 /*B*/, 'bold' ], //粗體 
[ CKEDITOR.CTRL + 73 /*I*/, 'italic' ], //斜體 
[ CKEDITOR.CTRL + 85 /*U*/, 'underline' ], //下劃線 

[ CKEDITOR.ALT + 109 /*-*/, 'toolbarCollapse' ] 


//設定快捷鍵 可能與瀏覽器快捷鍵衝突 plugins/keystrokes/plugin.js. 
config.blockedKeystrokes = [ 
CKEDITOR.CTRL + 66 /*B*/, 
CKEDITOR.CTRL + 73 /*I*/, 
CKEDITOR.CTRL + 85 /*U*/ 


//設定編輯內元素的背景色的取值 plugins/colorbutton/plugin.js. 
config.colorButton_backStyle = { 
element : 'span', 
styles : { 'background-color' : '#(color)' } 


//設定前景色的取值 plugins/colorbutton/plugin.js 
config.colorButton_colors = '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520, 

006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE, 

A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5, 

FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF’ 

//是否在選擇顏色時顯示“其它顏色”選項 plugins/colorbutton/plugin.js 
config.colorButton_enableMore = false 

//區塊的前景色預設值設定 plugins/colorbutton/plugin.js 
config.colorButton_foreStyle = { 
element : 'span', 
styles : { 'color' : '#(color)' } 
}; 

//所需要新增的CSS檔案 在此新增 可使用相對路徑和網站的絕對路徑 
config.contentsCss = './contents.css'; 

//文字方向 
config.contentsLangDirection = 'rtl'; //從左到右 

//CKeditor的配置檔案 若不想配置 留空即可 
CKEDITOR.replace( 'myfiled', { customConfig : './config.js' } ); 

//介面編輯框的背景色 plugins/dialog/plugin.js 
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)'; //可設定參考 
config.dialog_backgroundCoverColor = 'white' //預設 

//背景的不透明度 數值應該在:0.0~1.0 之間 plugins/dialog/plugin.js 
config.dialog_backgroundCoverOpacity = 0.5 

//移動或者改變元素時 邊框的吸附距離 單位:畫素 plugins/dialog/plugin.js 
config.dialog_magnetDistance = 20; 

//是否拒絕本地拼寫檢查和提示 預設為拒絕 目前僅firefox和safari支援 plugins/wysiwygarea/plugin.js. 
config.disableNativeSpellChecker = true 

//進行表格編輯功能 如:新增行或列 目前僅firefox支援 plugins/wysiwygarea/plugin.js 
config.disableNativeTableHandles = true; //預設為不開啟 

//是否開啟 圖片和表格 的改變大小的功能 config.disableObjectResizing = true; 
config.disableObjectResizing = false //預設為開啟 

//設定HTML文件型別 
config.docType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- 

transitional.dtd%22' ; 

//是否對編輯區域進行渲染 plugins/editingblock/plugin.js 
config.editingBlock = true; 

//編輯器中回車產生的標籤 
config.enterMode = CKEDITOR.ENTER_P; //可選:CKEDITOR.ENTER_BR或CKEDITOR.ENTER_DIV 

//是否使用HTML實體進行輸出 plugins/entities/plugin.js 
config.entities = true; 

//定義更多的實體 plugins/entities/plugin.js 
config.entities_additional = '#39'; //其中#代替了& 

//是否轉換一些難以顯示的字元為相應的HTML字元 plugins/entities/plugin.js 
config.entities_greek = true; 

//是否轉換一些拉丁字元為HTML plugins/entities/plugin.js 
config.entities_latin = true; 

//是否轉換一些特殊字元為ASCII字元 如"This is Chinese: 漢語."轉換為"This is Chinese: &#27721;&#35821;." 

plugins/entities/plugin.js 
config.entities_processNumerical = false; 

//新增新元件 
config.extraPlugins = 'myplugin'; //非預設 僅示例 

//使用搜索時的高亮色 plugins/find/plugin.js 
config.find_highlight = { 
element : 'span', 
styles : { 'background-color' : '#ff0', 'color' : '#00f' } 
}; 

//預設的字型名 plugins/font/plugin.js 
config.font_defaultLabel = 'Arial'; 

//字型編輯時的字符集 可以新增常用的中文字元:宋體、楷體、黑體等 plugins/font/plugin.js 
config.font_names = 'Arial;Times New Roman;Verdana'; 

//文字的預設式樣 plugins/font/plugin.js 
config.font_style = { 
element : 'span', 
styles : { 'font-family' : '#(family)' }, 
overrides : [ { element : 'font', attributes : { 'face' : null } } ] 
}; 

//字型預設大小 plugins/font/plugin.js 
config.fontSize_defaultLabel = '12px'; 

//字型編輯時可選的字型大小 plugins/font/plugin.js 
config.fontSize_sizes 

='8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px'

//設定字型大小時 使用的式樣 plugins/font/plugin.js 
config.fontSize_style = { 
element : 'span', 
styles : { 'font-size' : '#(size)' }, 
overrides : [ { element : 'font', attributes : { 'size' : null } } ] 
}; 

//是否強制複製來的內容去除格式 plugins/pastetext/plugin.js 
config.forcePasteAsPlainText =false //不去除 

//是否強制用“&”來代替“&amp;”plugins/htmldataprocessor/plugin.js 
config.forceSimpleAmpersand = false; 

//對address標籤進行格式化 plugins/format/plugin.js 
config.format_address = { element : 'address', attributes : { class : 'styledAddress' } }; 

//對DIV標籤自動進行格式化 plugins/format/plugin.js 
config.format_div = { element : 'div', attributes : { class : 'normalDiv' } }; 

//對H1標籤自動進行格式化 plugins/format/plugin.js 
config.format_h1 = { element : 'h1', attributes : { class : 'contentTitle1' } }; 

//對H2標籤自動進行格式化 plugins/format/plugin.js 
config.format_h2 = { element : 'h2', attributes : { class : 'contentTitle2' } }; 

//對H3標籤自動進行格式化 plugins/format/plugin.js 
config.format_h1 = { element : 'h3', attributes : { class : 'contentTitle3' } }; 

//對H4標籤自動進行格式化 plugins/format/plugin.js 
config.format_h1 = { element : 'h4', attributes : { class : 'contentTitle4' } }; 

//對H5標籤自動進行格式化 plugins/format/plugin.js 
config.format_h1 = { element : 'h5', attributes : { class : 'contentTitle5' } }; 

//對H6標籤自動進行格式化 plugins/format/plugin.js 
config.format_h1 = { element : 'h6', attributes : { class : 'contentTitle6' } }; 

//對P標籤自動進行格式化 plugins/format/plugin.js 
config.format_p = { element : 'p', attributes : { class : 'normalPara' } }; 

//對PRE標籤自動進行格式化 plugins/format/plugin.js 
config.format_pre = { element : 'pre', attributes : { class : 'code' } }; 

//用分號分隔的標籤名字 在工具欄上顯示 plugins/format/plugin.js 
config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre;address;div'; 

//是否使用完整的html編輯模式 如使用,其原始碼將包含:<html><body></body></html>等標籤 
config.fullPage = false; 

//是否忽略段落中的空字元 若不忽略 則字元將以“”表示 plugins/wysiwygarea/plugin.js 
config.ignoreEmptyParagraph = true; 

//在清除圖片屬性框中的連結屬性時 是否同時清除兩邊的<a>標籤 plugins/image/plugin.js 
config.image_removeLinkByEmptyURL = true; 

//一組用逗號分隔的標籤名稱,顯示在左下角的層次巢狀中 plugins/menu/plugin.js. 
config.menu_groups 

='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenf 

ield,imagebutton,button,select,textarea'; 

//顯示子選單時的延遲,單位:ms plugins/menu/plugin.js 
config.menu_subMenuDelay = 400; 

//當執行“新建”命令時,編輯器中的內容 plugins/newpage/plugin.js 
config.newpage_html = ''; 

//當從word裡複製文字進來時,是否進行文字的格式化去除 plugins/pastefromword/plugin.js 
config.pasteFromWordIgnoreFontFace = true; //預設為忽略格式 

//是否使用<h1><h2>等標籤修飾或者代替從word文件中貼上過來的內容 plugins/pastefromword/plugin.js 
config.pasteFromWordKeepsStructure = false; 

//從word中貼上內容時是否移除格式 plugins/pastefromword/plugin.js 
config.pasteFromWordRemoveStyle = false; 

//對應後臺語言的型別來對輸出的HTML內容進行格式化,預設為空 
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP Code 
config.protectedSource.push( //g ); // ASP Code 
config.protectedSource.push( /(]+>[\s|\S]*?<\/asp:[^\>]+>)|(]+\ />)/gi ); // ASP.Net Code 

//當輸入:shift+Enter時插入的標籤 
config.shiftEnterMode = CKEDITOR.ENTER_P; //可選:CKEDITOR.ENTER_BR或CKEDITOR.ENTER_DIV 

//可選的表情替代字元 plugins/smiley/plugin.js. 
config.smiley_descriptions = [ 
':)', ':(', ';)', ':D', ':/', ':P', 
'', '', '', '', '', '', 
'', ';(', '', '', '', '', 
'', ':kiss', '' ]; 

//對應的表情圖片 plugins/smiley/plugin.js 
config.smiley_images = [ 
'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif', 
'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif', 
'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif', 
'broken_heart.gif','kiss.gif','envelope.gif']; 

//表情的地址 plugins/smiley/plugin.js 
config.smiley_path = 'plugins/smiley/images/'; 

//頁面載入時,編輯框是否立即獲得焦點 plugins/editingblock/plugin.js plugins/editingblock/plugin.js. 
config.startupFocus = false; 

//載入時,以何種方式編輯 原始碼和所見即所得 "source"和"wysiwyg" plugins/editingblock/plugin.js. 
config.startupMode ='wysiwyg'; 

//載入時,是否顯示框體的邊框 plugins/showblocks/plugin.js 
config.startupOutlineBlocks = false; 

//是否載入樣式檔案 plugins/stylescombo/plugin.js. 
config.stylesCombo_stylesSet = 'default'; 
//以下為可選 
config.stylesCombo_stylesSet = 'mystyles'; 
config.stylesCombo_stylesSet = 'mystyles:/editorstyles/styles.js'; 
config.stylesCombo_stylesSet = 'mystyles:http://www.example.com/editorstyles/styles.js'; 

//起始的索引值 
config.tabIndex = 0; 

//當用戶鍵入TAB時,編輯器走過的空格數,(&nbsp;) 當值為0時,焦點將移出編輯框 plugins/tab/plugin.js 
config.tabSpaces = 0; 

//預設使用的模板 plugins/templates/plugin.js. 
config.templates = 'default'; 

//用逗號分隔的模板檔案plugins/templates/plugin.js. 
config.templates_files = [ 'plugins/templates/templates/default.js' ] 

//當使用模板時,“編輯內容將被替換”框是否選中 plugins/templates/plugin.js 
config.templates_replaceContent = true; 

//主題 
config.theme = 'default'; 

//撤銷的記錄步數 plugins/undo/plugin.js 
config.undoStackSize =20; 

// 在 CKEditor 中整合 CKFinder,注意 ckfinder 的路徑選擇要正確。 
//CKFinder.SetupCKEditor(null, '/ckfinder/'); 



//////////////////////////////// 

1. 呼叫CKEditor方法 

在頁面里加載核心js檔案:<script type=”text/javascript” src=”ckeditor/ckeditor.js”></script>,按常規方式放置textarea,如:< textarea id=”editor1″ name=”editor1″ rows=”10″ cols=”80″>初始化html內容</textarea> 

然後在textarea後面寫js:<script type=”text/javascript”>CKEDITOR.replace( ‘editor1′ );</script> 

其他呼叫方式可參考 _samples 目錄下的示例。 

2. 配置個性化工具欄 

ckeditor預設的工具欄中很多不常用,或者相對中文來說不適用。可通過配置預設工具欄方式實現,最簡潔的方法是直接修改配置檔案 config.js 我的config.js內容如下: 

CKEDITOR.editorConfig = function( config ) 

// Define changes to default configuration here. For example: 
// config.language = ‘fr’; 
config.uiColor = ‘#ddd’; 

config.toolbar = ‘Cms’; 
config.toolbar_Cms = 

['Source','-'], 
['Cut','Copy','Paste','PasteText','PasteFromWord','-'], 
['Undo','Redo','-','Find','Replace','RemoveFormat'],['Link','Unlink','Anchor'], 
['Image','Flash','Table','HorizontalRule', '-'],['Maximize'], 
‘/’, 
['Bold','Italic','Underline','Strike','-'], 
['FontSize'],['TextColor','BGColor'], 
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], 
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], 
['PageBreak', 'Page'] 
]; 

config.filebrowserUploadUrl = ‘/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files’; 
config.fontSize_sizes = ‘10/10px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;28/28px;32/32px;48/48px;’; 

config.extraPlugins = ‘apage’; 
}; 

3. 將編輯器內文字修改為14px (預設12px,對中文顯示不太好看) 

1)視覺化編輯裡預設字型大小:修改根目錄下 contents.css,將body中font-size: 12px改為 font-size: 14px 

2)原始碼檢視字型大小:修改skins\kama\editor.css,在最後加一句:.cke_skin_kama textarea.cke_source { font-size:14px; } 
4. 外掛編寫流程和例項程式碼 

1) 在plugins目錄新建資料夾apage,在apage下新建檔案:plugin.js 內容如下: 

CKEDITOR.plugins.add( ‘apage’, 

init : function( editor ) 

// Add the link and unlink buttons. 
editor.addCommand( ‘apage’, new CKEDITOR.dialogCommand( ‘apage’ ) ); 
editor.ui.addButton( ‘Page’, 

//label : editor.lang.link.toolbar, 
label : “Page”, 

//icon: ‘images/anchor.gif’, 
command : ‘apage’ 
} ); 
//CKEDITOR.dialog.add( ‘link’, this.path + ‘dialogs/link.js’ ); 
CKEDITOR.dialog.add( ‘apage’, function( editor ) 

return { 
title : ‘文章分頁’, 
minWidth : 350, 
minHeight : 100, 
contents : [ 

id : 'tab1', 
label : 'First Tab', 
title : 'First Tab', 
elements : 


id : 'pagetitle', 
type : 'text', 
label : '請輸入下一頁文章標題<br />(不輸入預設使用當前標題+數字形式)' 



], 
onOk : function() 

editor.insertHtml(”[page="+this.getValueOf( 'tab1', 'pagetitle' )+"]“); 

}; 
} ); 
}, 

requires : [ 'fakeobjects' ] 
} ); 

2)在toolbar中加一項Page,並在配置中宣告新增擴充套件外掛 config.extraPlugins = ‘apage’; 有兩種方法實現,方法一是直接在config.js中新增,示例本文上面的config.js示例程式碼;方法二:在引用CKEditor的地方加配置參 數,如: 

CKEDITOR.replace( 'editor1', 

extraPlugins : ‘examenLink’, 
toolbar : [ 
['Undo','Redo','-','Cut','Copy','Paste'], 
['ExamenLink','Bold','Italic','Underline',], 
['Link','Unlink','Anchor','-','Source'],['Page'] 

}); 

此時你應該看到編輯器裡多了一個空白的按鈕了。 

解決空白按鈕的方法有二: 

方法1:修改外掛程式碼,plugin,將icon定義為一個存在的圖示。 

方法2:讓編輯顯示Label的文字。需要加在放編輯器的頁面里加css(注重:cke_button_apage 的名稱與實際保持一致。) 
<style type=”text/css”> 
.cke_button_apage .cke_icon { display : none !important; } 
.cke_button_apage .cke_label { display : inline !important; } 
< /style> 

假如你的分頁只需要插入一個分頁符,不需要像本文需要填寫標題,那更簡單,只需要修改外掛程式碼即可。

相關推薦

CKEditor用法大全 實現編輯預設原始碼檢視

一、使用方法: 更改編輯器預設為原始碼檢視 var editor1 = CKEDITOR.replace('<%=txtShowCode.ClientID%>', { skin: "kama", width: 780, height: 500,startupM

怎麼將織夢圖集模型編輯文章編輯

今天跟版網小編在使用織夢圖集編輯器的時候發現圖集編輯器的功能要比文章的編輯器少很多,釋出內容的時候很不好用,比如圖片居中,編輯居中等功能,具體不知道官方為何將這個編輯器簡化的,我們如何將編輯器改成文章的一樣呢?圖集編輯器:文章編輯器: 修改方法如下:   將/dede/temp

springmvc後臺如何接收ckeditor富文本編輯編輯的內容

pan idt png code none order 生成 htm host 1把ckeditor的文本區,改成文章類的body,後臺用mvc的屬性自動封裝來接收,接收一個article類就行了 2吧文本區當string來接收 數據庫中如何存儲呢? 使用hibernate

提交資料判斷kindediter編輯是否

var $editor = KindEditor.create('textarea[name="content"]') save(); if(editor.html(

wordpress 設定編輯預設模式

wordpress現在有兩種編輯器模式,視覺化模式和文字模式,可以通過下面的方式進行設定預設模式: // 設定文字編輯為預設,視覺化是tinymce add_filter( 'wp_default_e

CKEditor入門篇----建立編輯的方式(1)

配置指令碼建立編輯器 步驟:           如上圖所示,有三種類型的編輯器可以選擇     a. Basic package        基礎版     b. Standard package 標準版     c. Full package          

hbuilder配置瀏覽器 設定編輯預設瀏覽器

工具欄———點選執行——點選執行配置 出現下面對話方塊 然後點選你想設定預設瀏覽頁面的瀏覽器  右側解析如下 自己瀏覽器的預設路徑 可以點選桌面瀏覽器圖示 檢視屬性 或者直接開啟檔案所在地址即可 備註 :執行下的預設圖示不可修改  只能是編輯器預設的    想用自己設

ubuntu系統編輯要更換預設vim

ubuntu系統編輯器要怎麼更換預設為vim  一、直接在終端輸入: echo export EDITOR=/usr/bin/vim >> ~/.bashrc  二、使用系統管理工具update-alternatives 在終端輸入: update-alternat

php實現ckeditor編輯新增水印及使用誤區

是這個樣子的,我的在給一個比較老的網站需要增加文章水印的功能,本來我是想拷貝來的 用就成了, 但是總是有錯誤提示! 因此,只能自己寫了; 一、定義了一個 setwater.php的檔案 ``` function setwater($src,$water){ //$src

Git windows 設定notepad++預設的文字編輯

為什麼要設成notepad++ 版本控制系統是沒法跟蹤Word檔案的改動的,如果要真正使用版本控制系統,就要以純文字方式編寫檔案。 windows自帶的notepad也有問題…不是純UTF-8編碼 notepad++ 免費,並且用得順手。 詳細過程

Linux系統下的vi編輯的使用(以VMware下的Ubuntu64例)

linux系統 編輯器 一般模式 ubuntu虛擬機 vi編譯器 上午花費一些時間學習vi編輯器,下面把學習的一些經驗記錄在這篇博文中。 vi編輯器是Linux系統下的基本編譯器,工作在字符模式,是一個很高效的文本編譯器,它在系統和服務器管理上的功能是普通的圖形編譯器所不能夠

瀏覽器更改實現webstrom等前端編輯的同步更新

F12 str 控制 img .cn 像素 3-9 谷歌 同時   經常寫css時是不是瀏覽器調一下幾像素,然後會編輯器改改改,有時候改好幾次,真的是累死寶寶了,最近發現了谷歌瀏覽器的強大功能,更改實現代碼同步更新,直接可以瀏覽器寫代碼同時實現同步刷新了,而且最重要的不需要

Unity編輯開發,使用CustomPropertyDrawer實現枚舉中文顯示

常常 image list 動畫 但是 var tty tip enum         在Unity開發中,枚舉常常被用到。但是Unity自身對於枚舉值,並不能做好中文的支持。無論是Head或者Tool

Ext grid中單元格編輯,editorcombobox時用法

.com clas ont con reat back trap hang style { header: ‘TO_PTN_NM‘, dataIndex: "TO_PTN_NM", sortable: true, rend

Dedecms v5.7 CKEditor編輯回車將<br>和<div>改了<p>的解決方法

dedecms 編輯器Dedecms v5.7 SP1的Ckeditor編輯器有些改動,默認為回車鍵換行、Shift+Enter換段落,但各位站長朋友都習慣了直接敲回車換段落,查看後發現它的配置文件裏是可以修改解決的,其實你可以把下面的代碼註釋掉就可以采用另外一種模式了(enter換段落):1、找到:安裝目

linux中行編輯sed的基本用法

sed的基本用法linux中行編輯器sed的基本用法sed的處理方法默認逐行讀取文件到內存中---->把符合模式的行讀取到屬於sed的內存中(sed的模式空間)進行編輯---->將處理後模式空間的內容顯示到屏幕上sed:行編輯器,默認不編輯源文件,僅對模式空間中的數據進行處理顯示使用方法sed [

《Linux命令行與shell腳本編程大全》第十章 使用編輯

命令 filename 令行 識別 shel edit 其他命令 shift 文件 主要介紹vim, nano, emacs,KWrite,Kate,GNOME 10.1 vim Unix系統最初的編輯器 10.1.1檢查vim軟件包 先搞明白你所用的Linux系統是哪種v

編輯拓展九——用代碼實現unity菜單命令

中一 post body 同時 selected 使用 最大的 自動調用 ima 描述   今天給美術寫了個工具,通過一些檢查把一些有問題的物件選出來,並讓其中一個處於選中狀態, 方便美術有方向的修改。中間遇到了一個問題,有問題的物件太多,點一次工具,需要按一下F來把

用python實現一個命令行文本編輯

screen alt 保存 模型 既然 ffffff 圖片 單行 pda “這看起來相當愚蠢”——題記   不過我整個人都很荒誕,何妨呢?貼一張目前的效果圖   看起來很舒服,不是麽?即使一切都是個幌子:光標只能在最後,按一下上下左右就會退出,一行超出75個字符

更換WordPress編輯TinyMCE Advanced

splay isp 關系 選擇 rdp auto body 工具欄 mic WordPress自帶的編輯器功能很少,連更換字體樣式大小都不行,沒關系WordPress的插件中心插件非常多 在插件中心搜索TinyMCE Advanced 安裝啟用 還沒完 點擊設置 裏面