Submitting data from ckeditor tags are cut - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Submitting data from ckeditor tags are cut (/showthread.php?tid=61018) |
Submitting data from ckeditor tags are cut - El Forum - 08-29-2014 [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... Submitting data from ckeditor tags are cut - El Forum - 08-29-2014 [eluser]ivantcholakov[/eluser] Are there form_validation rules for the textarea? strip_tags or similar filter? Submitting data from ckeditor tags are cut - El Forum - 08-29-2014 [eluser]ivantcholakov[/eluser] Also, see this page http://ckeditor.com/ckeditor_4.3_beta/samples/datafiltering.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/ Submitting data from ckeditor tags are cut - El Forum - 08-29-2014 [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 Submitting data from ckeditor tags are cut - El Forum - 08-29-2014 [eluser]mstdmstd[/eluser] Yes, thanks, it works with Code: allowedContent: true, https://github.com/EllisLab/CodeIgniter/wiki/htmlpurifier 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... Submitting data from ckeditor tags are cut - El Forum - 08-30-2014 [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-edition-3/www/playground/online-editor/user-mode In this example, If you choose "Online Editor - Admin Mode", you may test uploading images within content. |