Property | Type | Description | |
---|---|---|---|
$ForceWysiwyg | integer | mixed |
Property | Type | Description | |
---|---|---|---|
$AssetPath | Asset path for this plugin, set in Gdn_Form_BeforeBodyBox_Handler. | ||
$Format | Default format being used for current rendering. Can be one of the formats listed in $Formats. | ||
$Formats | List of possible formats the editor supports. | ||
$canUpload | boolean | ||
$editorBaseUploadDestinationDir | string | ||
$editorFileInputName | This is used as the input name for file uploads. It will be passed to JS as well. Note that it can be defined as an array, by adding square brackets, e.g., editorupload[], but that will make all the Vanilla upload classes incompatible because they are hardcoded to handle only single files at a time, not an array of files. Perhaps in future make core upload classes more flexible. | ||
$mediaCache | This will cache the discussion media results for the page request. Populated from either the db or memcached. | ||
$mediaCacheExpire | How long memcached holds data until it expires. | ||
$pluginInfo | Give class access to PluginInfo |
Method | Description | |
---|---|---|
__construct ( ) | Setup some variables for instance. | |
assetModel_styleCss_handler ( $Sender ) | Load CSS into head for editor | |
base_render_before ( $Sender ) | Placed these components everywhere due to some Web sites loading the editor in some areas where the values were not yet injected into HTML. | |
discussionController_afterCommentBody_handler ( $Sender, $Args ) | ||
discussionController_afterDiscussionBody_handler ( $Sender, $Args ) | ||
gdn_form_beforeBodyBox_handler ( Gdn_Form $Sender, $Args ) | Attach editor anywhere 'BodyBox' is used. | |
getAbsoluteDestinationFilePath ( $tmpFilePath, $fileExtension, $uploadDestinationDir = '' ) | Instead of using Gdn_Upload->GenerateTargetName, create one that depends on SHA1s, to reduce space for duplicates, and use smarter folder sorting based off the SHA1s. | |
getAllowedEditorActions ( ) : array | Set the editor actions to true or false to enable or disable the action from displaying in the editor toolbar. | |
getBaseUploadDestinationDir ( $subdir = false ) | Specific to editor upload paths | |
getFontFamilyOptions ( ) : array | Generate list of font families. Remember to create corresponding CSS. | |
isEmbeddedComment ( Controller $Sender ) : boolean | Check if comments are embedded. | |
mediaCache ( $Sender ) | Get media list for inserting into discussion and comments. | |
messagesController_afterConversationMessageBody_handler ( $Sender, $Args ) | ||
messagesController_afterConversationSave_handler ( object $Sender, array $Args ) | Attach files to a message during conversation save. | |
messagesController_afterMessageSave_handler ( object $Sender, array $Args ) | Attach files to a message during save. | |
postController_afterCommentBody_handler ( $Sender, $Args ) | ||
postController_afterCommentSave_handler ( object $Sender, array $Args ) | Attach files to a comment during save. | |
postController_afterDiscussionSave_handler ( object $Sender, array $Args ) | Attach files to a discussion during save. | |
postController_discussionFormOptions_handler ( $Sender, $Args ) | ||
postController_editorUpload_create ( PostController $Sender, array $Args = [] ) | ||
preloadDiscussionMedia ( integer $discussionID, array $commentIDList, $type = 'discussion' ) : array | Query the Media table for any media related to the current discussion, including all the comments. This will be cached per discussion. | |
saveUploads ( $id, $type ) | Save uploads. | |
settingsController_addEditCategory_handler ( Gdn_Controller $Sender ) | Add upload option checkbox to custom permissions for categories. | |
settingsController_editor_create ( SettingsController $Sender, array $Args ) | ||
setup ( ) | When enabled, disable other known editors that may clash with this one. | |
sortWeightedOptions ( &$options ) | Sort dropdown options by given weight. | |
structure ( ) | ||
utilityController_mediaThumbnail_create ( $sender, $media_id ) | Create and display a thumbnail of an uploaded file. | |
validateUploadDestinationPath ( string $path ) | Check if provided path is valid, creates it if it does not exist, and verifies that it is writable. |
Method | Description | |
---|---|---|
attachEditorUploads ( integer $FileID, integer $ForeignID, string $ForeignType ) : boolean | Attach a file to a foreign table and ID. | |
attachUploadsToComment ( $Sender, string $Type = 'comment', array | object $row = null ) | Attach image to each discussion or comment. | |
cacheAttachedMedia ( mixed $Sender ) | Called to prepare data grab, and then cache the results on the software level for the request. | |
canUpload ( ) : boolean | Checks whether the canUpload property is set and if not, calculates it value. | |
deleteEditorUploads ( $MediaID, type $ForeignID = '', type $ForeignType = '' ) : boolean | Remove file from filesystem, and clear db entry. | |
getConversationMessageIDList ( $id ) : array | ||
getEditorToolbar ( $attributes = [] ) : array | This method will grab the permissions array from getAllowedEditorActions, build the "kitchen sink" editor toolbar, then filter out the allowed ones and return it. | |
getFontColorList ( ) : array | To enable more colors in the dropdown, simply expand the array to include more human-readable font color names. | |
getFontFormatOptions ( ) : array | Default formatting options available in the formatting dropdown. |
public assetModel_styleCss_handler ( $Sender ) |
public base_render_before ( $Sender ) |
protected cacheAttachedMedia ( mixed $Sender ) | ||
$Sender | mixed |
protected deleteEditorUploads ( $MediaID, type $ForeignID = '', type $ForeignType = '' ) : boolean | ||
$ForeignID | type | |
$ForeignType | type | |
return | boolean |
public discussionController_afterCommentBody_handler ( $Sender, $Args ) |
public discussionController_afterDiscussionBody_handler ( $Sender, $Args ) |
public gdn_form_beforeBodyBox_handler ( Gdn_Form $Sender, $Args ) | ||
$Sender | Gdn_Form |
public getAbsoluteDestinationFilePath ( $tmpFilePath, $fileExtension, $uploadDestinationDir = '' ) |
public getAllowedEditorActions ( ) : array | ||
return | array | List of allowed editor actions |
public getBaseUploadDestinationDir ( $subdir = false ) |
protected getConversationMessageIDList ( $id ) : array | ||
$id | ||
return | array |
protected getEditorToolbar ( $attributes = [] ) : array | ||
return | array | Returns the array of allowed editor toolbar actions |
protected getFontColorList ( ) : array | ||
return | array | Returns array of font colors to use in dropdown |
public getFontFamilyOptions ( ) : array | ||
return | array |
protected getFontFormatOptions ( ) : array | ||
return | array |
public isEmbeddedComment ( Controller $Sender ) : boolean | ||
$Sender | Controller | |
return | boolean |
public mediaCache ( $Sender ) |
public messagesController_afterConversationMessageBody_handler ( $Sender, $Args ) |
public messagesController_afterConversationSave_handler ( object $Sender, array $Args ) | ||
$Sender | object | |
$Args | array |
public messagesController_afterMessageSave_handler ( object $Sender, array $Args ) | ||
$Sender | object | |
$Args | array |
public postController_afterCommentBody_handler ( $Sender, $Args ) |
public postController_afterCommentSave_handler ( object $Sender, array $Args ) | ||
$Sender | object | |
$Args | array |
public postController_afterDiscussionSave_handler ( object $Sender, array $Args ) | ||
$Sender | object | |
$Args | array |
public postController_discussionFormOptions_handler ( $Sender, $Args ) |
public postController_editorUpload_create ( PostController $Sender, array $Args = [] ) | ||
$Sender | PostController | |
$Args | array |
public settingsController_addEditCategory_handler ( Gdn_Controller $Sender ) | ||
$Sender | Gdn_Controller |
public settingsController_editor_create ( SettingsController $Sender, array $Args ) | ||
$Sender | SettingsController | |
$Args | array |
public setup ( ) |
public sortWeightedOptions ( &$options ) |
public utilityController_mediaThumbnail_create ( $sender, $media_id ) |
public validateUploadDestinationPath ( string $path ) | ||
$path | string | Path to validate |
protected $AssetPath |
protected $Format |
protected string $editorBaseUploadDestinationDir | ||
return | string |
protected $editorFileInputName |
protected $mediaCache |
protected $mediaCacheExpire |