Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ckeditor): replaced ckeditor4 with ckeditor5
- Loading branch information
Showing
194 changed files
with
8,094 additions
and
1,045 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
CKEditor | ||
======== | ||
|
||
With this plugin enabled the longtext input fields will get a WYSIWYG editor which allows for some additional markup options for your text. | ||
|
||
Depending on the configuration the editor can be enriched with various text style markup options. | ||
Have a look at the CKEditor website for a full featured editor. | ||
|
||
Images | ||
------ | ||
Elgg also supports uploading images in the editor. | ||
You can upload images using a file dialog or just drag/drop or copy/paste the image into the editor. | ||
|
||
Mentions | ||
-------- | ||
With the CKEditor plugin you also enable mention capabilities. By default you can mention: | ||
|
||
- Users: use `@` to start autocompleting users | ||
- Groups: use `!` to start autocompleting groups | ||
- Searchable content: use `[` to start autocompleting content | ||
|
||
When you select something from the autocomplete list a link to the selected user/group/content will be added to the content. | ||
Based on the mentioned users preference they will also be notified they have been mentioned. | ||
|
||
Toolbar configuration | ||
--------------------- | ||
This plugin provides a standard toolbar configuration for the default and simple editor. | ||
The plugin settings allow you to configure a custom toolbar config. | ||
Almost all ckeditor plugins are available for use. | ||
Information on how to configure a toolbar can be found here: https://ckeditor.com/docs/ckeditor5/latest/features/toolbar/toolbar.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
engine/classes/Elgg/Notifications/MentionsEnqueueEventHandler.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace Elgg\Notifications; | ||
|
||
/** | ||
* Enqueue mention notifications | ||
* | ||
* @since 5.0 | ||
*/ | ||
class MentionsEnqueueEventHandler { | ||
|
||
/** | ||
* @var array Contains entity GUIDs already queued this script run (to prevent doubles) | ||
*/ | ||
protected static array $queued = []; | ||
|
||
/** | ||
* Queue a mentions notification event for later handling | ||
* | ||
* @param \Elgg\Event $event 'create:after'|'update:after', 'all' | ||
* | ||
* @return void | ||
*/ | ||
public function __invoke(\Elgg\Event $event) { | ||
$object = $event->getObject(); | ||
if (!$object instanceof \ElggEntity || $object->access_id === ACCESS_PRIVATE || in_array($object->guid, self::$queued)) { | ||
return; | ||
} | ||
|
||
// prevent double enqueue | ||
self::$queued[] = $object->guid; | ||
|
||
_elgg_services()->notifications->enqueueEvent('mentions', $object); | ||
} | ||
} |
Oops, something went wrong.