Friday, October 26, 2018

embed iframe ckeditor

C:\Apache24\htdocs\cleargov1\qa-plugin\wysiwyg-editor\CUSTOMIZE.md


Customizing your editor
=============================

This Q2A plugin uses a custom build of CKEditor to keep it simple. However, if you would like to add new features it is straightforward to do so. All languages supported by Q2A are included, but if you are using a different language you can add add it using the tool, or remove all the languages you don't need to create an even smaller plugin.

1. Go to the CKEditor Builder: http://ckeditor.com/builder
2. Click the "Upload build-config.js" button in the top right, and select the `build-config.js` file from the `ckeditor` directory to start with the current config.
3. Use the various controls to modify your build. You can add plugins, choose a different skin and choose the language(s) you require.
4. Make sure "Optimized" is selected and download the custom package.
5. Delete the `ckeditor` folder inside `wysiwyg-editor`, then extract the downloaded package here, replacing the `ckeditor` folder.

=============================


1) go to
https://ckeditor.com/cke4/builder


2) upload current build-config.js (C:\Apache24\htdocs\cleargov1\qa-plugin\wysiwyg-editor\ckeditor\build-config.js)


3)now in available section select source area, iframe ,


4) click left arrow in middle to add selected to list.


5) download zip

6) replace unzipped ckeditor folder.


7) Now you see source button, iframe button at ckeditor, but iframe would not save.
you must filter out iframe.


8)C:\Apache24\htdocs\cleargov1\qa-plugin\wysiwyg-editor\qa-wysiwyg-editor.php
here is where to clean filter html:
'content' => qa_sanitize_html($html, false, true),




9)C:\Apache24\htdocs\cleargov1\qa-include\qa-base.php

 comment out 'safe' => 1,

htmLawed  library use to filter html.

http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawed_README.htm#s3.3


$safe = htmLawed($html, array(
// 'safe' => 1,     // exclude applet, audio, canvas, embed, iframe, object, script and video  http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawed_README.htm#s3.3
'elements' => '*+embed+object-form',
'schemes' => 'href: aim, feed, file, ftp, gopher, http, https, irc, mailto, news, nntp, sftp, ssh, telnet; *:file, http, https; style: !; classid:clsid',
'keep_bad' => 0,
'anti_link_spam' => array('/.*/', ''),
'hook_tag' => 'qa_sanitize_html_hook_tag',
));



10) done



No comments: