allow to upload files from the ckeditor

while here:
- update ckeditor to 4.21.0
- add a Sourcedialog plugin to the ckeditor
This commit is contained in:
2023-04-09 14:10:21 +02:00
parent 6a2da642b0
commit a49b10ed2d
5 changed files with 87 additions and 39 deletions

View File

@@ -34,22 +34,26 @@ editorElement.setAttribute( 'contenteditable', 'true' );
CKEDITOR.inline( '[0]',
{
// https://ckeditor.com/docs/ckeditor4/latest/guide/dev_file_browse_upload.html
// config.filebrowserBrowseUrl - setting contains the location of an external file browser
// that should be launched when the Browse Server button is pressed.
// config.filebrowserUploadUrl - setting contains the location of a script that handles file uploads.
// If set, the Upload tab will appear in some dialog windows — the ones
// where such functionality is available, i.e. Link, Image.
filebrowserBrowseUrl: '[doc_base_url][dir]ls?ckeditor_browse&fullscreen',
filebrowserUploadUrl: '[doc_base_url][dir]upload?ckeditor_upload',
customConfig : '[doc_base_url]/var/ckeditor_winix.js',
//extraPlugins : 'sourcedialog',
extraPlugins : 'sourcedialog',
//removePlugins : 'sourcearea',
toolbar : 'winix',
height : '350px',
scayt_autoStartup : false, // spellchecker disabled
//docType : '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
docType : '<!DOCTYPE html>',
entities : false, // when true then ó becames &oacute,
toolbar_winix :
\[
\['Save','Preview','-'\],
\['Sourcedialog', 'Save','Preview','-'\],
\['Cut','Copy','Paste','PasteText','PasteFromWord','-'\],
\['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'\],