Drop WYSIWYG SCEditor and replace it with CKEditor + Bbcode plugin

Started by Karmasterrr, May 07, 2021, 07:49:28 PM

Previous topic - Next topic

Karmasterrr

Hello guys!
Let me start from afar. After installing SMF 2.1, I got WYSIWYG with new SCEditor WYSIWYG editor and I was very disappointed..

My forum involves copying/pasting and editing programming code inside forum messages and SCEditor does all wrong:
1) lacks undo/redo feature (very buggy)
2) lacks correct copy/paste code with formatting

I tried to fix these bugs by myself (I am javascript developer) and even sent some patches to SCEditor developer but after hours of research I made a decision that SCEditor is hopeless and should be replaced with something else. I may be wrong here, it's my personal opinion.

I searched all over the internet for a good BBCode WYSIWYG editor but there is none.

Now I have only two alternatives:
1) return to plain-text BBCode editor and drop WYSIWYG completely
2) try CKEditor with Bbcode plugin

My initial tests showed that CKEditor has good undo/redo support, smiles, copy/paste and probably can be used without many patches.

Anyone tried to replace SMF editor with SCEditor before ?


vii

Replacing the editor itself is not that difficult, but you'll need to make sure CKEditor's BBCode plugin generates output that works with SMF's own implementation. Probably some work to make sure editor buttons / emoticon support match up with forum capabilities. You would have to manually add support for 3rd party bbcode, though. FWIW I swapped out SMF 1.1.21's editor with SCEditor and it wasn't that hard but it got a bit tedious too. Further reading on this editor makes me think it would probably take more effort.


Looks interesting, though. This would be a good mod idea. Not that SCEditor isn't good itself (imo), but this seems notably richer in features and I would imagine much more frequently updated.

live627

If it's so bad, then help us  fix it.. I am a  maintainer of SCEditor.

Truth be told, it is way better than the wysiwyg editor in 2.0, not even close. Way more features. Better integration.

Still has a  long way to go.

QuoteSCEditor is hopeless and should be replaced
this mentality will keep the editor  from  improving

Quote
I tried to fix these bugs by myself (I am javascript developer) and even sent some patches to SCEditor
Neat! Maybe with your help we can improve SCEditor.

There is a pending pull request rewriting the undo plugin https://github.com/samclarke/SCEditor/pull/830

By the way, what is the filesize  of CKEditor?

Karmasterrr

Quote from: live627 on May 08, 2021, 07:15:56 AM
If it's so bad, then help us  fix it.. I am a  maintainer of SCEditor.
The problem is not in SCEditor alone, but in contentEditable, it is a garbage: https://ckeditor.com/blog/ContentEditable-The-Good-the-Bad-and-the-Ugly/
And I see no reason to fix is twice, CKEditor already done that work: replaced browser undo/redo with own code and almost any aspect of contentEditable was rewritten due to bugs in native implementations.

Quote from: live627 on May 08, 2021, 07:15:56 AM
By the way, what is the filesize  of CKEditor?
CKEditor 4 is huge, 10x size of SCEditor, 650k unzipped, 220kb zipped, but it is mature full featured editor without major bugs.

New CKEditor 5 lacks BBCode support yet (pending feature request).

Karmasterrr

After trying SCEditor in non-WYSIWYG plain-text BBCode mode I realized that undo/redo in it is also bugged
fixed more new bugs and almost got crazy  :o

... what should I do now
... looking back at ideal: markItUp! for SMF 2.0

vii

Quote from: Karmaster on May 08, 2021, 02:49:22 PM
After trying SCEditor in non-WYSIWYG plain-text BBCode mode I realized that undo/redo in it is also bugged
fixed more new bugs and almost got crazy  :o

... what should I do now
... looking back at ideal: markItUp! for SMF 2.0

Is adaptation of other tools worth the effort when SCEditor developers are already working on / testing fixes for the issues you've raised? If you're looking at integrating CKEditor or another one, it's \going to require a large time investment anyway, at which point you could have just waited for the aforementioned update. You could always grab the beta code from the link live627 posted and carry on from there, too.

Karmasterrr

Quote from: vii on May 08, 2021, 04:01:16 PM
Is adaptation of other tools worth the effort when SCEditor developers are already working on / testing fixes for the issues you've raised? If you're looking at integrating CKEditor or another one, it's \going to require a large time investment anyway, at which point you could have just waited for the aforementioned update. You could always grab the beta code from the link live627 posted and carry on from there, too.
I tried that. Adopting CKEditor may be easier.
At this point I just use fixed CKEditor in source-only mode, and even that mode requires modifications to SMF code ... it is bugged by default.

m4z

Quote from: Karmaster on May 08, 2021, 04:57:06 PM
I tried that. Adopting CKEditor may be easier.
At this point I just use fixed CKEditor in source-only mode, and even that mode requires modifications to SMF code ... it is bugged by default.

If you'd be more specific, some of these bugs could be fixed.
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

Col

I have to agree with the OP. I just started another thread looking for solution to CKEditor's behaviour. I am about to upgrade to SMF 2.1 and cannot believe just how buggy this editor is, to the point of being unusable. Nearly half the time when composing a post (here), I run into problems editing my post as composing it. I place the cursor where I need to make the edit and it will immediately and repeatedly jump to the end of content/line/sentence. I have to monkey around trying to get in a return somewhere before where I wish to edit - and this is hard enough - to stand a chance of being able to edit the post.

Windows 10 & 11; Firefox.

Advertisement: