Suggested changes made to place the <code> tag button in editor. Removed <tt> completely.

This commit is contained in:
Jari Turkia 2019-03-20 18:27:04 +02:00 committed by onli
parent 9a8fb7a696
commit 6191c740fe

View File

@ -65,7 +65,7 @@ CKEDITOR.editorConfig = function( config ) {
- Allow <pre[*attributes](*classes)> for custom attributes/classes in code blocks - Allow <pre[*attributes](*classes)> for custom attributes/classes in code blocks
*/ */
// protect // protect
config.extraAllowedContent = 'mediainsert[*]{*}(*);gallery[*]{*}(*);media[*]{*}(*);script[*]{*}(*);audio[*]{*}(*);div[*]{*}(*);span[*]{*}(*);img[height,width];pre[*](*);code;tt;'; config.extraAllowedContent = 'mediainsert[*]{*}(*);gallery[*]{*}(*);media[*]{*}(*);script[*]{*}(*);audio[*]{*}(*);div[*]{*}(*);span[*]{*}(*);img[height,width];pre[*](*);code;';
// Do not use auto paragraphs, added to these allowed tags (only!). Please regard that this was marked deprecated by CKE 4.4.5, but is a need for (our use of) extraAllowedContent - check this again by future versions! // Do not use auto paragraphs, added to these allowed tags (only!). Please regard that this was marked deprecated by CKE 4.4.5, but is a need for (our use of) extraAllowedContent - check this again by future versions!
config.autoParagraph = false; // defaults(true) config.autoParagraph = false; // defaults(true)
@ -229,13 +229,13 @@ CKEDITOR.editorConfig = function( config ) {
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] }, { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 's9yml', items : s9ymediabuttons }, { name: 's9yml', items : s9ymediabuttons },
{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] }, { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] },
{ name: 'codetag', items: [ 'Code' ] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] }, { name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'mediaembed', items : [ 'MediaEmbed' ] }, { name: 'mediaembed', items : [ 'MediaEmbed' ] },
{ name: 'others', items : s9ypluginbuttons }, { name: 'others', items : s9ypluginbuttons },
{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }, { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] },
{ name: 'document', groups : [ 'mode', 'document', 'doctools' ], items : [ 'Source' ] }, { name: 'document', groups : [ 'mode', 'document', 'doctools' ], items : [ 'Source' ] },
{ name: 'cheatsheet', items : ['CheatSheet'] }, { name: 'cheatsheet', items : ['CheatSheet'] },
{ name: 'codetag', items: [ 'Code' ] }
]; ];
// console.log(JSON.stringify(config.toolbar_Full)); // console.log(JSON.stringify(config.toolbar_Full));
@ -250,11 +250,11 @@ CKEDITOR.editorConfig = function( config ) {
{ name: 'insert', items: [ 'Image', '-', 'Table', 'HorizontalRule', 'SpecialChar' ] }, { name: 'insert', items: [ 'Image', '-', 'Table', 'HorizontalRule', 'SpecialChar' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', '-', 'Undo', 'Redo' ] }, { name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', '-', 'Undo', 'Redo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Scayt' ] }, { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Scayt' ] },
{ name: 'codetag', items: [ 'Code' ] },
{ name: 'mediaembed', items: [ 'MediaEmbed' ] }, { name: 'mediaembed', items: [ 'MediaEmbed' ] },
{ name: 'others', items: s9ypluginbuttons }, { name: 'others', items: s9ypluginbuttons },
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source' ] }, { name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source' ] },
{ name: 'about', items: [ 'About' ] }, { name: 'about', items: [ 'About' ] },
//{ name: 'codetag', items: [ 'Code' ] }
]; ];
// console.log(JSON.stringify(config.toolbar_s9y)); // console.log(JSON.stringify(config.toolbar_s9y));