Hello,
here is plugin. It uses Iframe and
https://drive.google.com/viewerng/viewer for displaying files. Inside plugin you can change this for any other viewer.
There is no documentation about Google doc viewer API available for commercial use, if someone finds any, please provide info.
The plugin uses publicly available url, so it cannot be tested on local machine !
To make it work, here is procedure:
1. Unpack and paste folder in Plugins folder (root/modules/ckeditor/ckeditor/plugins)
2. Open file root/modules/ckeditor/wb_config/wb_config.js and inside toolbar that you are using ADD Button "pdfOglas"
Example:
config.toolbar_WB_Full =
[
{ name: 'document', items : ['Source','-','Save','Print','-','DocProps','Preview','NewPage','-','Templates']},
{ name: 'clipboard', items : ['Cut','Copy','-','Undo','Redo']},
{ name: 'editing', items : ['Find','-','SelectAll','-','SpellChecker', 'Scayt']},
{ name: 'colors', items : ['TextColor','BGColor']},
'/',
{ name: 'basicstyles', items : ['Bold','Italic','Underline','Strike','Subscript','Superscript','Shy','-','RemoveFormat']},
{ name: 'paragraph', items : ['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl']},
{ name: 'forms', items : ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton','HiddenField']},
'/',
{ name: 'styles', items : ['Styles','Format','Font','FontSize' ]},
{ name: 'links', items : ['Link','Unlink','Anchor','Wbdroplets','Wblink']},
{ name: 'insert', items : ['Image','Table','HorizontalRule','Smiley','emoji','SpecialChar','PageBreak','Iframe']},
{ name: 'media', items : ['wboembed']},
{ name: 'tools', items : ['Maximize', 'ShowBlocks','Syntaxhighlight','CreatePlaceholder']},
{ name: 'info', items : ['About']},
'/',
{ name: 'custom1', items : ['pdfOglas']}
];
Note last line - 'custom1' toolbar group, and its Button there pdfOglas.
3. Open file root/modules/ckeditor/include.php and around line 211
if (!$bWbConfigSetting ) {
$ckeditor->config['extraPlugins'] =
'codemirror'
. ',filebrowser'
. ',syntaxhighlight'
. ',wblink'
. ',wbdroplets'
. ',wbabout'
. ',wboembed'
. ',wbrelation'
// ADD PLUGIN
. ',pdfoglas'
Thats it, there will be red PDF button inside CKEditor. The styling you can adapt to your own needs. To access dialog, there are different varions: 1. click on placeholder than Button, double click on placeholder, or right click on placeholder.
Have fun.
I.