1/** 2 * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. 3 * For licensing, see https://ckeditor.com/legal/ckeditor-oss-license 4 */ 5 6CKEDITOR.editorConfig = function( config ) { 7 // Define changes to default configuration here. For example: 8 // config.language = 'fr'; 9 // config.uiColor = '#AADC6E'; 10 11 config.skin = 'moono'; 12 config.height = 400; 13 14 // ãã¼ã«ãã¼ã®è¨å® 15 // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.toolbar_Full 16 config.toolbar = [ 17 { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, 18 { name: 'styles', items : [ 'Format','FontSize','Styles' ] }, 19 { name: 'insert', items : [ 'Image','Table','HorizontalRule','Youtube','Audio','Video' ] }, 20 { name: 'document', items : [ 'Source','-','DocProps','-','Templates' ] }, 21 { name: 'tools', items : [ 'Maximize' ] }, 22 '/', 23 { name: 'basicstyles', items : [ 'TextColor','BGColor','Bold','Italic','Strike','Subscript','Superscript','-','RemoveFormat' ] }, 24 { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ] }, 25 { name: 'links', items : [ 'CmsLink','CmsUnlink','CmsAnchor' ] }, 26 { name: 'editing', items : [ 'Find','Replace','-','SelectAll' ] }, 27 ]; 28 29 // å¤é¨CSSãèªã¿è¾¼ã¿ 30 var css = config.contentsCss; 31 if (!(css instanceof Array)) { css = [css]; } 32 css.push('/_common/js/ckeditor/file_icons.css'); 33 css.push('/_common/js/ckeditor/cms_contents.css'); 34 35 config.contentsCss = css; 36 37 // ãã©ã³ããµã¤ãºããã¼ã»ã³ãã¼ã¸ã«å¤æ´ 38 config.fontSize_sizes = '10px/62.5%;12px/75%;14px/87.5%;16p(æ¨æº)/100%;18px/112.5%;20px/125%;24px/150%;28px/175%;32px/200%'; 39 40 // ãã©ã¼ãããããh1ãªã©ãé¤å¤ 41 config.format_tags = 'p;h2;h3;h4;h5;h6'; 42 43 // ã¹ã¿ã¤ã«ã»ãã 44 config.stylesSet = [ 45 { name : 'é»è²ãã¼ã«ã¼', element : 'span', styles : { 'background-color' : '#ffff99' } }, 46 { name : 'ãªã¬ã³ã¸ãã¼ã«ã¼', element : 'span', styles : { 'background-color' : '#ffcc99' } }, 47 { name : 'ãã³ã¯ãã¼ã«ã¼', element : 'span', styles : { 'background-color' : '#ff99cc' } }, 48 { name : 'æ°´è²ãã¼ã«ã¼', element : 'span', styles : { 'background-color' : '#99ffff' } }, 49 { name : 'ç·ãã¼ã«ã¼', element : 'span', styles : { 'background-color' : '#99ff99' } }, 50 ]; 51 52 // 使ç¨ãããã³ãã¬ã¼ã 53 config.templates_files = [ '/_themes/js/ckeditor/templates/cms_template.js' ]; 54 config.templates = 'cms'; 55 56 // ã¤ã³ãã³ã 57 config.indentOffset = 1; 58 config.indentUnit = 'em'; 59 60 // ã«ã©ã¼ã³ã¼ãè¨å® 61 config.colorButton_colors = 'ee0000,0000ff,008800,663399,D54300,000099,8F4D00,767676,e60066,0068ff,777c00,93008F,D13D6D,147AA3,000000,ffffff'; 62 63 // ãã®ä»ã®ã«ã©ã¼ã³ã¼ã鏿ãè¨±å¯ 64 config.colorButton_enableMore = true; 65 66 // ãã³ãã¬ã¼ãå 容ã®ç½®ãæãããªã 67 config.templates_replaceContent = false; 68 69 // ãã©ã°ã¤ã³ 70 config.extraPlugins = 'font,colorbutton,justify,find,selectall,templates,sharedspace,youtube,audio,video,zomekilink,zomekiwordcount'; 71 72 // tagã®è¨±å¯ 73 config.allowedContent = { 74 $1: { // Use the ability to specify elements as an object. 75 elements: CKEDITOR.dtd, 76 attributes: true, 77 styles: true, 78 classes: true 79 } 80 }; 81 82 // table廿¢ã»éæ¨å¥¨å±æ§å ¥åä¸å¯ 83 config.disallowedContent = 'font;table[summary,height,cellspacing,cellpadding,align]{height};script;*[on*];*[data-*]'; 84 85 // Wordããã®è²¼ä»ã§è£ 飾ãåé¤ãã 86 config.pasteFromWordRemoveFontStyles = true; 87 config.pasteFromWordRemoveStyles = true; 88 89 // zomekiwordcountãã©ã°ã¤ã³ 90 config.zomekiwordcount = { 91 showParagraphs: false, 92 showWordCount: false, 93 showCharCount: true, 94 countBytesAsChars: true, 95 countSpacesAsChars: true, 96 countHTML: true 97 }; 98 99 // ãã¼ã¸ã§ã³ãã§ã㯠100 config.versionCheck = false; 101}; 102 103CKEDITOR.on('instanceReady', function(ev) { 104 var rules = { 105 elements: { 106 a: function(element) { 107 // hrefããjavascriptãããã³ã«ãé¤å» 108 var href = element.attributes.href; 109 if (href && href.match(/^javascript:/i)) { 110 element.attributes['data-cke-saved-href'] = ''; 111 } 112 } 113 } 114 }; 115 ev.editor.dataProcessor.htmlFilter.addRules(rules); 116 ev.editor.dataProcessor.dataFilter.addRules(rules); 117}); 118 119CKEDITOR.on('dialogDefinition', function(ev){ 120 var dialogName = ev.data.name; 121 var dialogDefinition = ev.data.definition; 122 if (dialogName == 'table' || dialogName == 'tableProperties') { 123 var infoTab = dialogDefinition.getContents('info'); 124 // ãã¼ãã«å¹ ã®ããã©ã«ãå¤ãåé¤ 125 txtWidth = infoTab.get('txtWidth'); 126 txtWidth['default'] = ''; 127 //ãæ ç·ã®å¹ ããåé¤ 128 infoTab.remove('txtBorder'); 129 } 130 if (dialogName == 'cellProperties') { 131 var infoTab = dialogDefinition.getContents('info'); 132 infoTab.remove('borderColor'); 133 infoTab.remove('borderColorChoose'); 134 } 135}); 136 137// ã¹ã¿ã¤ã«ã®è¨å® 138CKEDITOR.stylesSet.add('my_styles', [
139 // Block-level styles 140 { name: 'æ ç·', element: 'p', styles: { 'border': '1px solid #999' , 'padding' : '10px' } }, 141 142 // Inline styles 143 { name: '強調ï¼èµ¤æåï¼', element: 'span', styles: { 'color': '#e00' } } 144]); 145 146CKEDITOR.config.stylesSet = 'my_styles'; 147CKEDITOR.config.coreStyles_strike = { element : 'del' }; 148CKEDITOR.config.coreStyles_underline = { element : 'ins' }; 149 150// ã¤ã³ã©ã¤ã³ã¨ãã£ã¿èªåçæãç¡å¹å 151CKEDITOR.disableAutoInline = true;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.