Submitting data from ckeditor tags are cut |
[eluser]mstdmstd[/eluser]
Hi all, I want to include ckeditor in my ci 2.2 project, I do it with JS code like Code: jQuery(document).ready(function ($) { In config file I set value Code: $config['global_xss_filtering'] = false; If theere is something better of ckeditor for CI project? ckeditor is power and easy...
[eluser]ivantcholakov[/eluser]
Are there form_validation rules for the textarea? strip_tags or similar filter?
[eluser]ivantcholakov[/eluser]
Also, see this page http://ckeditor.com/ckeditor_4.3_beta/sa...ering.html The configuration option config.allowedContent is interesting, set it to true. See their example there: Code: CKEDITOR.replace( textarea_id, { Edit: If it works, then you need to decide what tags are to be allowed and to enumerate them. But... this is javascript implemented protection that is easy to be bypassed. I prefer to set config.allowedContent to true and then to apply my filter as a form validation rule, a server-side filter. Have a look at http://htmlpurifier.org/
[eluser]InsiteFX[/eluser]
You do not need all of that here is how to load ckeditor just using a css class. Code: <!-- Textareas and Editor Content --> | false in the form tag should be on submit return false you know how it goes Simple to load it. If you need to add anything add in the ckeditor/config.js file
[eluser]mstdmstd[/eluser]
Yes, thanks, it works with Code: allowedContent: true, https://github.com/EllisLab/CodeIgniter/...mlpurifier My question are 1) which are most common settings for htmlpurifier for most common case, when content editor filles some articles? 2) Are there some convinient CI/ckeditor plugings ? After short review I would like to have possibility to select images from some specific directory. Say, some article can have several imaghes uploaded, and I want user could select and insert images into article etc...
[eluser]ivantcholakov[/eluser]
In htmlpurifier's page this is mentioned: https://github.com/refringe/codeigniter-htmlpurifier. It is a helper, showing how you can make filters based on HTMLPurifier. In general, I have made this good for me integration: CKEditor + HTMLPurifier based filters + KCFinder (with some compatibility modifications, uploads images, etc.) + easy configuration of all the things (editor's toolbars should match to the allowed HTML-tags). It is a complex implementation, I don't know whether you be able to reproduce it within your project. I don't know other solutions for CodeIgniter with such features. See this page: http://iridadesign.com/starter-public-ed.../user-mode In this example, If you choose "Online Editor - Admin Mode", you may test uploading images within content. |
Welcome Guest, Not a member yet? Register Sign In |