Ticket #10185: 10185.patch
File 10185.patch, 1.7 KB (added by , 10 years ago) |
---|
-
_source/plugins/placeholder/plugin.js
10 10 11 11 (function() 12 12 { 13 var placeholderReplaceRegex = /\[\[[^\]]+\]\]/g;14 13 CKEDITOR.plugins.add( 'placeholder', 15 14 { 16 15 requires : [ 'dialog' ], … … 86 85 { 87 86 var dataProcessor = editor.dataProcessor, 88 87 dataFilter = dataProcessor && dataProcessor.dataFilter, 89 htmlFilter = dataProcessor && dataProcessor.htmlFilter; 90 88 htmlFilter = dataProcessor && dataProcessor.htmlFilter, 89 placeholderReplaceRegex = new RegExp('\\' + editor.config.placeholderClosures[0] + '\\' + editor.config.placeholderClosures[1] + '[^\\' + editor.config.placeholderClosures[2] + ']+\\' + editor.config.placeholderClosures[2] + '\\' + editor.config.placeholderClosures[3], 'g'); 90 91 91 if ( dataFilter ) 92 92 { 93 93 dataFilter.addRules( … … 169 169 return node; 170 170 } 171 171 }; 172 173 /** 174 * Define the type of closures used for the placeholder element. 175 * The first two array elements are used to define which string determines the start and the third 176 * and fourth array elements define which string determines the end. 177 * A slight word of caution: do not declare the defaults with strings which are more commonly used 178 * as this will return false positives matches on non placeholder text 179 * @type Array of string 180 * @default ['[', '[', ']', ']'] 181 * @example 182 * config.placeholderClosures = ['[', '[', ']', ']'] 183 */ 184 CKEDITOR.config.placeholderClosures = ['[', '[', ']', ']']; 185 No newline at end of file