Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
h5p-editor-php-library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
h5p-editor-php-library
Commits
ea51e758
Commit
ea51e758
authored
4 years ago
by
Paal Joergensen
Browse files
Options
Downloads
Patches
Plain Diff
Fix bring back missing custom plugins
parent
a31ecb6a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ckeditor/plugins/customCodeHighlighter/plugin.js
+43
-0
43 additions, 0 deletions
ckeditor/plugins/customCodeHighlighter/plugin.js
ckeditor/plugins/removeRedundantNBSP/plugin.js
+29
-0
29 additions, 0 deletions
ckeditor/plugins/removeRedundantNBSP/plugin.js
with
72 additions
and
0 deletions
ckeditor/plugins/customCodeHighlighter/plugin.js
0 → 100644
+
43
−
0
View file @
ea51e758
// Create a new plugin which registers a custom code highlighter
CKEDITOR
.
plugins
.
add
(
'
customCodeHighlighter
'
,
{
afterInit
:
function
(
editor
)
{
var
highlighter
=
new
CKEDITOR
.
plugins
.
codesnippet
.
highlighter
({
languages
:
{
apache
:
'
Apache
'
,
bash
:
'
Bash
'
,
coffeescript
:
'
CoffeeScript
'
,
cpp
:
'
C++
'
,
cs
:
'
C#
'
,
css
:
'
CSS
'
,
diff
:
'
Diff
'
,
html
:
'
HTML
'
,
http
:
'
HTTP
'
,
ini
:
'
INI
'
,
java
:
'
Java
'
,
javascript
:
'
JavaScript
'
,
json
:
'
JSON
'
,
makefile
:
'
Makefile
'
,
markdown
:
'
Markdown
'
,
nginx
:
'
Nginx
'
,
objectivec
:
'
Objective-C
'
,
perl
:
'
Perl
'
,
php
:
'
PHP
'
,
python
:
'
Python
'
,
ruby
:
'
Ruby
'
,
sql
:
'
SQL
'
,
vbscript
:
'
VBScript
'
,
xhtml
:
'
XHTML
'
,
xml
:
'
XML
'
},
init
:
function
(
ready
)
{
// Here we should load any required resources
ready
();
},
highlighter
:
function
(
code
,
language
,
callback
)
{
// Here we are highlighting the code and returning it.
callback
(
code
);
}
});
editor
.
plugins
.
codesnippet
.
setHighlighter
(
highlighter
);
}
});
This diff is collapsed.
Click to expand it.
ckeditor/plugins/removeRedundantNBSP/plugin.js
0 → 100644
+
29
−
0
View file @
ea51e758
/*
* Remove entities which were inserted ie. when removing a space and
* immediately inputting a space.
*
* NB: We could also set config.basicEntities to false, but this is stongly
* adviced against since this also does not turn ie. < into <.
* @link http://stackoverflow.com/a/16468264/328272
*
* Based on StackOverflow answer.
* @link http://stackoverflow.com/a/14549010/328272
*/
CKEDITOR
.
plugins
.
add
(
'
removeRedundantNBSP
'
,
{
afterInit
:
function
(
editor
)
{
var
config
=
editor
.
config
,
dataProcessor
=
editor
.
dataProcessor
,
htmlFilter
=
dataProcessor
&&
dataProcessor
.
htmlFilter
;
if
(
htmlFilter
)
{
htmlFilter
.
addRules
({
text
:
function
(
text
)
{
return
text
.
replace
(
/
(\w)
/gi
,
'
$1
'
);
}
},
{
applyToAll
:
true
,
excludeNestedEditable
:
true
});
}
}
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment