Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
576d6ee7
Unverified
Commit
576d6ee7
authored
Jul 12, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create event handlers to load ckeditor or simplemde
parent
b1f87931
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
LoadCkEditor.php
Modules/Core/Events/Handlers/LoadCkEditor.php
+16
-0
LoadSimpleMde.php
Modules/Core/Events/Handlers/LoadSimpleMde.php
+17
-0
No files found.
Modules/Core/Events/Handlers/LoadCkEditor.php
0 → 100644
View file @
576d6ee7
<?php
namespace
Modules\Core\Events\Handlers
;
use
Modules\Core\Events\EditorIsRendering
;
class
LoadCkEditor
{
public
function
handle
(
EditorIsRendering
$editor
)
{
$editor
->
addJs
(
'ckeditor.js'
);
$editor
->
setEditorClass
(
'ckeditor'
);
return
false
;
}
}
Modules/Core/Events/Handlers/LoadSimpleMde.php
0 → 100644
View file @
576d6ee7
<?php
namespace
Modules\Core\Events\Handlers
;
use
Modules\Core\Events\EditorIsRendering
;
class
LoadSimpleMde
{
public
function
handle
(
EditorIsRendering
$editor
)
{
$editor
->
addJs
(
'simplemde.js'
)
->
addCss
(
'simplemde.css'
);
$editor
->
setEditorClass
(
'simplemde'
);
$editor
->
setEditorJsPartial
(
'core::partials.simplemde'
);
return
false
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment