Closed (fixed)
Project:
CKEditor CodeMirror
Version:
3.0.x-dev
Component:
Code
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2021 at 19:25 UTC
Updated:
26 Sep 2022 at 03:49 UTC
Jump to comment: Most recent
Comments
Comment #2
matt_paz commentedComment #3
matt_paz commentedComment #4
matt_paz commentedComment #5
matt_paz commentedComment #6
wellsThanks @matt_paz!
Per https://github.com/w8tcha/CKEditor-CodeMirror-Plugin/issues/176 it seems that the maintainer of the underlying plugin for CKEditor does not intend to port the CodeMirror plugin to CKE5 so we will need to create out own unless another option turns up somewhere.
Comment #7
matt_paz commentedYa, I'd totally forgotten that I'd already filed an issue on w8tcha/CKEditor-CodeMirror-Plugin back in July. Unfortunately, I haven't run across anything similar for either ACE or CodeMirror (relative to support for CKE5). I haven't looked deeply tho. But yes, this may prove a heavier lift than one might have otherwise anticipated. I fear CKE5 might represent some interesting challenges for this plugin, but time will tell.
Comment #8
wellsI'm fiddling in a 3.0.x with the prospect of implementing this more directly (i.e. without the generic CKEditor CodeMirror plugin). Not sure if it will really work out. It seems like it should be straightforward but I might be missing something.
Currently I've got it to a point where when CKE5 goes in to source edit mode this module's plugin uses a (global, from library) CodeMirror instance to replace the CKE5 source editing
textarea. In it's current state the positioning is messed up and changes don't get saved (need to wire up an event for that apparently) but code does get highlighted!I'm also looking at CodeMirror 6 but it removes the
fromTextAreamethod that enables this in its current state. Understandably so because the performance is probably terrible for large sources. However if the current approach I'm trying doesn't really work a more complex implementation (essentially replacing source editing?) may be necessary anyway.Comment #9
matt_paz commentedNot sure if the progress on this issue will help, but I thought I'd pass it along on the chance it might represent a part of the puzzle.
Automatically use CKE5's General HTML Support feature on text formats without any TYPE_HTML_RESTRICTOR filter + add `sourceEditing` button
https://www.drupal.org/project/ckeditor5/issues/3216021
Comment #11
wellsI've got this basically functional in the 3.0.x branch now.
Things still TODO:
Comment #14
wellsComment #16
wellsComment #18
wellsComment #19
wellsComment #21
wellsComment #23
wells