CkeditorEditor
class CkeditorEditor implements EditorInterface (View source)
Properties
protected Liaison | $config | The configuration repository. |
|
protected PluginManager | $pluginManager | The plugin manager instance. |
|
protected ResponseAssetGroup | $assets | ||
protected string|null | $identifier | The custom editor identifier. |
|
protected string|null | $token | The CSRF token. |
|
protected bool | $allowFileManager | Can the editor offer the "browse files" feature? |
|
protected bool | $allowSitemap | Can the editor offer the "browse sitemap" feature? |
|
protected array | $styles |
Methods
Generate the Javascript code that initialize the plugin.
Generate the Javascript code that initialize the plugin when it will be used inline.
Generate the HTML to be placed in a page to display the inline editor.
Generate the HTML to be placed in a page to display the editor.
Generate the HTML to be placed in a page to display the editor.
Generate the standard Javascript code that initialize the plugin.
Build the list of required assets.
Returns a JSON Encoded string of styles.
Generate the HTML to be placed in a page to display the editor in composer views.
Generate the HTML to be placed in a page to display the editor when the page is in edito mode.
Can the editor offer the "browse files" feature?
Can the editor offer the "browse sitemap" feature?
Set if the editor can offer the "browse files" feature.
Set if the editor can offer the "browse sitemap" feature.
Get the plugin manager instance.
Set the CSRF token.
Set the custom editor identifier.
Get the editor identifier.
Get the HTML code to be used to initialize the editor.
Get the CKEditor language configuration.
Build an object containing the CKEditor preconfigured snippets and classes.
Details
__construct(Liaison $config, PluginManager $pluginManager, array $styles)
Initialize the instance.
string
getEditorInitJSFunction(array $dynamicOptions = [])
Generate the Javascript code that initialize the plugin.
string
outputInlineEditorInitJSFunction()
Generate the Javascript code that initialize the plugin when it will be used inline.
string
outputPageInlineEditor(string $key, string|null $content = null)
Generate the HTML to be placed in a page to display the inline editor.
string
outputStandardEditor(string $key, string|null $content = null)
Generate the HTML to be placed in a page to display the editor.
string
outputEditorWithOptions(string $key, array $options = [], string|null $content = null)
Generate the HTML to be placed in a page to display the editor.
string
outputStandardEditorInitJSFunction()
Generate the standard Javascript code that initialize the plugin.
saveOptionsForm(Request $request)
Save the plugin options.
requireEditorAssets()
Build the list of required assets.
string
getStylesJson()
Returns a JSON Encoded string of styles.
string
outputPageComposerEditor(string $key, string $content)
Generate the HTML to be placed in a page to display the editor in composer views.
string
outputBlockEditModeEditor(string $key, string $content)
Generate the HTML to be placed in a page to display the editor when the page is in edito mode.
bool
allowFileManager()
Can the editor offer the "browse files" feature?
bool
allowSitemap()
Can the editor offer the "browse sitemap" feature?
setAllowFileManager(bool $allow)
Set if the editor can offer the "browse files" feature.
setAllowSitemap(bool $allow)
Set if the editor can offer the "browse sitemap" feature.
PluginManager
getPluginManager()
Get the plugin manager instance.
setToken(string $token)
Set the CSRF token.
setIdentifier(string $identifier)
Set the custom editor identifier.
string
getIdentifier(bool $autogenerate = true)
Get the editor identifier.
protected string
getEditorScript(string $identifier, array $options = [])
Get the HTML code to be used to initialize the editor.
protected string|null
getLanguageOption()
Get the CKEditor language configuration.
private stdClass
getEditorSnippetsAndClasses()
Build an object containing the CKEditor preconfigured snippets and classes.