SMF icon indicating copy to clipboard operation
SMF copied to clipboard

[3.0] Replace AT.js (@mentions) with Tribute.js

Open dragomano opened this issue 11 months ago • 5 comments

The script used to mention users was updated 9 years ago, it would be nice to replace it.

The AT.js developer himself suggests using Tribute.js as a replacement, so I chose one of the latest forks.

Features

  • single script (tribute.js) instead of 2 (jquery.atwho.min.js, jquery.caret.min.js)
  • no dependencies on jQuery
  • there is no need to change the PHP backend code (we only change mentions.js)
  • there is a possibility of fine tuning (see options)

sshot-2

dragomano avatar Mar 10 '24 03:03 dragomano

Thanks! (just the emoji isn't enough)

live627 avatar Mar 10 '24 03:03 live627

If SCEditor is planned to be kept, it would be better to write a separate mentions plugin specifically for it. As it turns out, Tribute.js has issues with support for iframe and WYSIWYG editors.

dragomano avatar Apr 26 '24 12:04 dragomano

If SCEditor is planned to be kept

It is. If you want to find or create a solution that works with the WYSIWYG editor, that'd be lovely.

Sesquipedalian avatar Apr 26 '24 17:04 Sesquipedalian

The modern solutions have the tendency to abandon BBCode. For example, CKEditor 4 has BBCode addon, and perfect Mentions/ Tags and Emoji addon (3 in 1), but CKEditor 4 reached its End of Life (EOL) in June 2023. And CKEditor 5 doesn't have BBCode addon.

dragomano avatar Apr 27 '24 03:04 dragomano

Sorry if I wasn't clear. We have no plans to get rid of SCEditor. I meant that if you can find a solution to the problem that tribute.js doesn't work with SCEditor's WYSIWYG mode, that would be great. If that isn't possible, then we'll need to stick with at.js.

Sesquipedalian avatar Apr 27 '24 18:04 Sesquipedalian