I'm using CkEditor in a Laravel 5 project.
In the config.js under bower_component/ckeditor/
I used the following code:
CKEDITOR.editorConfig = function (config) {
// Define changes to default configuration here.
// For complete reference see:
// http://docs.ckeditor.com/#!/api/CKEDITOR.config
// The toolbar groups arrangement, optimized for two toolbar rows.
config.toolbarGroups = [
{name: 'clipboard', groups: ['clipboard', 'undo']},
{name: 'editing', groups: ['find', 'selection', 'spellchecker']},
{name: 'links'},
{name: 'insert'},
{name: 'forms'},
{name: 'tools'},
{name: 'document', groups: ['mode', 'document', 'doctools']},
{name: 'others'},
'/',
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
{name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi']},
{name: 'styles'},
{name: 'colors'},
{name: 'about'}
];
// Remove some buttons provided by the standard plugins, which are
// not needed in the Standard(s) toolbar.
config.removeButtons = 'Underline,Subscript,Superscript';
// Set the most common block elements.
config.format_tags = 'p;h1;h2;h3;pre';
// Simplify the dialog windows.
config.removeDialogTabs = 'image:advanced;link:advanced';
config.FormatOutput = false;
config.allowedContent = true;
};
Also, in the css in the related page, I used the below code:
$(function () {
CKEDITOR.replace('editor2', {
allowedContent: true,
});
});
In the HTML, I used the following code:
<textarea name="content" rows="10" cols="80" id="editor2"></textarea>
In the plugins
folder under the bower_component/ckeditor/plugins
, I see the "iframe" folder is exist. However, I can't see the iframe icon in the ckeditot toolbar. I configured "allowedContent" as true
as mentioned above. Here is the screen grab:
What is the issue?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire