From feb11b397156585328fc45e3c6169ac999bf11a7 Mon Sep 17 00:00:00 2001 From: bach Date: Thu, 16 Sep 2021 11:17:29 +0200 Subject: [PATCH] disabled video embed in full html format (for email), added syntax hightlighting with ckeditor_codeminor --- composer.json | 20 ++++++++ composer.lock | 68 ++++++++++++++++++++++++- config/sync/core.extension.yml | 1 + config/sync/editor.editor.full_html.yml | 24 +++++++-- config/sync/editor.editor.wysiwyg.yml | 28 ++++++++-- config/sync/filter.format.full_html.yml | 12 ++--- config/sync/filter.format.wysiwyg.yml | 5 +- 7 files changed, 139 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 5344897..1680272 100644 --- a/composer.json +++ b/composer.json @@ -37,6 +37,24 @@ "type": "zip" } } + }, + { + "type": "package", + "package": { + "name": "w8tcha/ckeditor_codemirror", + "version": "v1.17.8", + "type": "drupal-library", + "extra": { + "installer-name": "ckeditor_codemirror" + }, + "dist": { + "url": "https://github.com/w8tcha/CKEditor-CodeMirror-Plugin/releases/download/untagged-f790a6bee2e01b538b13/CKEditor-CodeMirror-Plugin.zip", + "type": "zip" + }, + "require": { + "composer/installers": "~1.0" + } + } } ], "require": { @@ -50,6 +68,7 @@ "drupal/audiofield": "^1.10", "drupal/auto_entitylabel": "^2.x-dev", "drupal/better_messages": "^1.0@alpha", + "drupal/ckeditor_codemirror": "^2.3", "drupal/ckeditor_font": "^1.2", "drupal/ckeditor_uploadimage": "^2.0", "drupal/colorbutton": "^1.3", @@ -145,6 +164,7 @@ "smalot/pdfparser": "*", "symfony/event-dispatcher": "4.3.4 as 3.4.99", "vlucas/phpdotenv": "^2.4", + "w8tcha/ckeditor_codemirror": "v1.17.8", "wa72/htmlpagedom": "1.3.*", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3", diff --git a/composer.lock b/composer.lock index 0757a34..ee05351 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b39b7f2234f15d815739981c1607eb3e", + "content-hash": "957ca05105e223d75024ee67bb653c06", "packages": [ { "name": "alchemy/zippy", @@ -3835,6 +3835,57 @@ "issues": "https://www.drupal.org/project/issues/checklistapi" } }, + { + "name": "drupal/ckeditor_codemirror", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/ckeditor_codemirror.git", + "reference": "8.x-2.3" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/ckeditor_codemirror-8.x-2.3.zip", + "reference": "8.x-2.3", + "shasum": "dfb00a0ec44953846d689d1e72f40e4201c8a355" + }, + "require": { + "drupal/core": "^8.8 || ^9" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-2.3", + "datestamp": "1586020798", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Nickolay Leshchev (Plazik)", + "homepage": "https://www.drupal.org/u/plazik", + "role": "Maintainer" + }, + { + "name": "Christopher C. Wells (wells)", + "homepage": "https://www.drupal.org/u/wells", + "role": "Co-maintainer" + } + ], + "description": "Adds the CKEditor CodeMirror source syntax highlighter plugin.", + "homepage": "https://drupal.org/project/ckeditor_codemirror", + "support": { + "source": "http://cgit.drupalcode.org/ckeditor_codemirror", + "issues": "https://www.drupal.org/project/issues/ckeditor_codemirror?version=8.x" + } + }, { "name": "drupal/ckeditor_font", "version": "1.2.0", @@ -21337,6 +21388,21 @@ ], "time": "2021-01-20T14:39:13+00:00" }, + { + "name": "w8tcha/ckeditor_codemirror", + "version": "v1.17.8", + "dist": { + "type": "zip", + "url": "https://github.com/w8tcha/CKEditor-CodeMirror-Plugin/releases/download/untagged-f790a6bee2e01b538b13/CKEditor-CodeMirror-Plugin.zip" + }, + "require": { + "composer/installers": "~1.0" + }, + "type": "drupal-library", + "extra": { + "installer-name": "ckeditor_codemirror" + } + }, { "name": "wa72/htmlpagedom", "version": "v1.3.2", diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 06b0911..58b9717 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -22,6 +22,7 @@ module: bulkdelete: 0 checklistapi: 0 ckeditor: 0 + ckeditor_codemirror: 0 ckeditor_font: 0 ckeditor_uploadimage: 0 colorbutton: 0 diff --git a/config/sync/editor.editor.full_html.yml b/config/sync/editor.editor.full_html.yml index 9240ada..326062e 100644 --- a/config/sync/editor.editor.full_html.yml +++ b/config/sync/editor.editor.full_html.yml @@ -41,7 +41,6 @@ settings: name: Média items: - DrupalImage - - video_embed - name: Outils items: @@ -54,10 +53,30 @@ settings: - JustifyRight - JustifyBlock plugins: + drupallink: + linkit_enabled: true + linkit_profile: default stylescombo: styles: '' language: language_list: un + codemirror: + enable: true + startupMode: wysiwyg + mode: htmlmixed + theme: monokai + options: + lineNumbers: true + lineWrapping: true + matchBrackets: true + autoCloseTags: true + autoCloseBrackets: true + enableSearchTools: true + enableCodeFolding: true + enableCodeFormatting: true + autoFormatOnStart: true + autoFormatOnModeChange: true + autoFormatOnUncomment: true font: font_names: '' font_sizes: '' @@ -70,9 +89,6 @@ settings: responsive: true width: '854' height: '480' - drupallink: - linkit_enabled: true - linkit_profile: default image_upload: status: true scheme: public diff --git a/config/sync/editor.editor.wysiwyg.yml b/config/sync/editor.editor.wysiwyg.yml index 5c68195..ed80c61 100644 --- a/config/sync/editor.editor.wysiwyg.yml +++ b/config/sync/editor.editor.wysiwyg.yml @@ -53,10 +53,35 @@ settings: - PasteText - PasteFromWord plugins: + drupallink: + linkit_enabled: true + linkit_profile: default stylescombo: styles: h4.inter-titre|Inter-titre language: language_list: un + codemirror: + enable: true + startupMode: wysiwyg + mode: htmlmixed + theme: monokai + options: + lineNumbers: true + lineWrapping: true + matchBrackets: true + autoCloseTags: true + autoCloseBrackets: true + enableSearchTools: true + enableCodeFolding: true + enableCodeFormatting: true + autoFormatOnStart: true + autoFormatOnModeChange: true + autoFormatOnUncomment: true + font: + font_names: '' + font_sizes: '' + colorbutton: + colors: '' video_embed: defaults: children: @@ -64,9 +89,6 @@ settings: responsive: true width: '854' height: '480' - drupallink: - linkit_enabled: true - linkit_profile: default image_upload: status: true scheme: public diff --git a/config/sync/filter.format.full_html.yml b/config/sync/filter.format.full_html.yml index cbf949a..579eb80 100644 --- a/config/sync/filter.format.full_html.yml +++ b/config/sync/filter.format.full_html.yml @@ -4,8 +4,8 @@ status: true dependencies: module: - editor + - linkit - url_to_video_filter - - video_embed_wysiwyg name: 'full html' format: full_html weight: -9 @@ -32,19 +32,13 @@ filters: filter_url_to_video: id: filter_url_to_video provider: url_to_video_filter - status: true + status: false weight: 0 settings: youtube: '1' youtube_webp_preview: '0' vimeo: '1' autoload: '0' - video_embed_wysiwyg: - id: video_embed_wysiwyg - provider: video_embed_wysiwyg - status: true - weight: 0 - settings: { } editor_file_reference: id: editor_file_reference provider: editor @@ -57,7 +51,7 @@ filters: status: false weight: -10 settings: - allowed_html: '