DNNCommunity / Dnn.CommunityForums

Open-source forums module for DNN Platform. This is a fork and continuance of the Active Forums module.
https://dnncommunity.org
Other
13 stars 21 forks source link

Offloading to HTML editor provider #174

Open Timo-Breumelhof opened 1 year ago

Timo-Breumelhof commented 1 year ago

In some issues we discussed offloading functionality to the DNN HTML editor provider. Examples: #158 #168 #162 #38

I spoke to @skamphuis and he mentioned something I think @mitchelsellers referenced in #38

My comparison with Open Content was incorrect as that module does not use the HTML editor provider but loads the CkEditor directly. That way you can push your own configuration to the Editor, but you cannot do that using the HTML editor provider (AFAIK). So that would mean that for the Emoticons to work an Admin would have to create a custom CkEditor configuration for the Forums Module. Unless we hack around that by writing a custom config to the Portal settings, but essentially that's like supporting CkEditor, not the HTML editor provider.

For #tag and @mention support, we would need a plugin for the editor (like the dnnpages plugin currently) I think, but that would then obviously only support CkEditor and anyone using another editor will have to create plugins themselves (but at least it can be done) I think "hacking" into the editor by executing code on keydown would make it again specific for CKE I think.

I wonder how many users are actually using another editor, but IMO we should try to do this using the HTML editor provider.

Thoughts?

WillStrohl commented 1 year ago

I agree that we should use the HTML editor provider. It does put us into an odd position for tagging, as you mention.

How much work would there be if the platform ended up using another HTML editor, or if a superuser does that right away? Isn't it possible to implement this feature regardless of the HTML editor?

Timo-Breumelhof commented 1 year ago

I think the issue is that the exposes only provides the HTML editor, not a config option or something alike. So for @mentions and #tags, we would have to create a editor plugin and it needs to be activated. ATM, the only option I see would be that the admin would have to edit the editor config for the module

mitchelsellers commented 1 year ago

My opinion here would be to load your own editor, with only the plugins you need.

You can chose a better editor, do better things, and Rachel down security much better. Than by reusing something that was designed for a content editor.

Timo-Breumelhof commented 1 year ago

I think I agree with @mitchelsellers. We do need control over the editor especially if we are going to integrate some extra plugins. We could load the CKEditor directly without using the Provider, and use our own configuration. This is what Open Content does and it works great, I can create a custom editor config per field limiting a user as much as I want, which is kind of what we need here..