1var gEdIntLinkName = ''; 2function showInternalLinks(dataArr, fnVars) 3{ 4 var linkObj = fnVars['dialog'].getContentElement('info', 'intPageId'); 5 var selVal = linkObj.getValue(); 6 //alert('---'+ selVal + '==' + gEdIntLinkName); 7 linkObj.clear(); 8 if(dataArr['id']){ 9 var tot = dataArr['id'].length; 10 if(tot>0){ 11 for ( var i = 0; i < tot; i++) { 12 linkObj.add(dataArr['label'][i],dataArr['id'][i]); 13 } 14 if(selVal!=''){ 15 linkObj.setValue(selVal); 16 }else if(gEdIntLinkName!=''){ 17 linkObj.setValue(gEdIntLinkName); 18 } 19 } 20 } 21 gEdIntLinkName = ''; 22} 23 24function covertToEditor(fieldId) { 25 26 var instance = CKEDITOR.instances[fieldId]; 27 if (instance) { 28 CKEDITOR.remove(instance); 29 } 30 31 CKEDITOR.plugins.addExternal('localelink', '/ckeditor/plugins/link/', 'plugin.js'); 32 33 var cssEdit = '/css/editor.css'; 34 var styleEdit = ''; 35 36 var config = { 37 customConfig: '/ckeditor/config.js', 38 toolbar: 'Full', 39 width: 700, 40 height: 300, 41 forcePasteAsPlainText: false, 42 startupFocus: true, 43 resize_enabled: false, 44 resize_maxHeight: 450, 45 resize_maxWidth: 650, 46 resize_minHeight: 300, 47 resize_minWidth: 500 48 }; 49 50 if ($('#' + fieldId).data('toolbar') == 'mobile-app') { 51 config.toolbar = [ 52 [ 'Format', '-', 'Bold', '-', 'Link', 'Unlink', 'Anchor' ] 53 ]; 54 config.format_tags = 'p'; 55 } 56 57 CKEDITOR.replace(fieldId, config); 58 CKEDITOR.instances[fieldId].fieldId = fieldId; 59 60 CKEDITOR.instances[fieldId].on('paste', function(evt){ 61 var filter = new CKEDITOR.filter( 'img[src,alt,width,height,style]{*}' ); 62 filter.allow( 'a[href,type,name]' ); 63 // Parse the HTML string to pseudo-DOM structure. 64 fragment = CKEDITOR.htmlParser.fragment.fromHtml( evt.data.dataValue ); 65 writer = new CKEDITOR.htmlParser.basicWriter(); 66 67 filter.applyTo( fragment ); 68 fragment.writeHtml( writer ); 69 evt.data.dataValue = writer.getHtml(); 70 }); 71 72} 73 74function covertToEditor_min(fieldId){ 75 76 var instance = CKEDITOR.instances[fieldId]; 77 if(instance) 78 { 79 CKEDITOR.remove(instance); 80 } 81 82 var cssEdit = '/css/editor.css'; 83 var styleEdit = ''; 84 CKEDITOR.replace(fieldId,{ 85 toolbar : 'Full', 86 width : 700, 87 height : 300, 88 forcePasteAsPlainText : true, 89 startupFocus : true, 90 resize_enabled : false, 91 resize_maxHeight : 450, 92 resize_maxWidth : 650, 93 resize_minHeight : 300, 94 resize_minWidth : 500 95 }); 96 CKEDITOR.instances[fieldId].fieldId = fieldId; 97} 98 99function getCkEditorValue(fieldId) 100{ 101 var value = CKEDITOR.instances[fieldId].getData(); 102 return value; 103}
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.