Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Ckeditor5 Complexitywiki Plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
Ckeditor5 Complexitywiki Plugins
Commits
ea71a653
Commit
ea71a653
authored
3 years ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Use code attribute for math delimiters
parent
1fae6cff
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
package.json
+1
-1
1 addition, 1 deletion
package.json
sample/ckeditor.js
+2
-2
2 additions, 2 deletions
sample/ckeditor.js
src/complexitywiki_plugins.js
+10
-4
10 additions, 4 deletions
src/complexitywiki_plugins.js
src/index.js
+1
-10
1 addition, 10 deletions
src/index.js
with
15 additions
and
17 deletions
.gitignore
+
1
−
0
View file @
ea71a653
...
@@ -4,3 +4,4 @@ node_modules/
...
@@ -4,3 +4,4 @@ node_modules/
tmp/
tmp/
sample/ckeditor.dist.js
sample/ckeditor.dist.js
/package-lock.json
/package-lock.json
*~
This diff is collapsed.
Click to expand it.
package.json
+
1
−
1
View file @
ea71a653
This diff is collapsed.
Click to expand it.
sample/ckeditor.js
+
2
−
2
View file @
ea71a653
...
@@ -25,14 +25,14 @@ import Table from '@ckeditor/ckeditor5-table/src/table';
...
@@ -25,14 +25,14 @@ import Table from '@ckeditor/ckeditor5-table/src/table';
import
TableToolbar
from
'
@ckeditor/ckeditor5-table/src/tabletoolbar
'
;
import
TableToolbar
from
'
@ckeditor/ckeditor5-table/src/tabletoolbar
'
;
import
TodoList
from
'
@ckeditor/ckeditor5-list/src/todolist
'
;
import
TodoList
from
'
@ckeditor/ckeditor5-list/src/todolist
'
;
import
MathJaxCodeDelimiters
from
'
../src/mathjax_code_delimiters
'
;
import
{
ComplexitywikiPlugins
}
from
'
../src/index
'
;
/* global document, window */
/* global document, window */
ClassicEditor
ClassicEditor
.
create
(
document
.
querySelector
(
'
#editor
'
),
{
.
create
(
document
.
querySelector
(
'
#editor
'
),
{
plugins
:
[
plugins
:
[
MathJaxCodeDelimiter
s
,
ComplexitywikiPlugin
s
,
Autoformat
,
Autoformat
,
AutoImage
,
AutoImage
,
BlockQuote
,
BlockQuote
,
...
...
This diff is collapsed.
Click to expand it.
src/
mathjax_code_delimiter
s.js
→
src/
complexitywiki_plugin
s.js
+
10
−
4
View file @
ea71a653
...
@@ -5,12 +5,18 @@ import {
...
@@ -5,12 +5,18 @@ import {
ButtonView
ButtonView
}
from
'
ckeditor5/src/ui
'
;
}
from
'
ckeditor5/src/ui
'
;
import
Code
from
'
@ckeditor/ckeditor5-basic-styles/src/code
'
;
import
displayIcon
from
'
../theme/icons/display.svg
'
;
import
displayIcon
from
'
../theme/icons/display.svg
'
;
import
inlineIcon
from
'
../theme/icons/inline.svg
'
;
import
inlineIcon
from
'
../theme/icons/inline.svg
'
;
export
default
class
MathJaxCodeDelimiter
s
extends
Plugin
{
export
default
class
ComplexitywikiPlugin
s
extends
Plugin
{
static
get
pluginName
()
{
static
get
pluginName
()
{
return
'
MathJaxCodeDelimiters
'
;
return
'
ComplexitywikiPlugins
'
;
}
static
get
requires
()
{
return
[
Code
];
}
}
init
()
{
init
()
{
...
@@ -35,7 +41,7 @@ export default class MathJaxCodeDelimiters extends Plugin {
...
@@ -35,7 +41,7 @@ export default class MathJaxCodeDelimiters extends Plugin {
// position of the cursor.
// position of the cursor.
this
.
listenTo
(
view
,
'
execute
'
,
()
=>
{
this
.
listenTo
(
view
,
'
execute
'
,
()
=>
{
model
.
change
(
writer
=>
{
model
.
change
(
writer
=>
{
const
textNode
=
writer
.
createText
(
'
`
$ $
`
'
);
const
textNode
=
writer
.
createText
(
'
$ $
'
,
{
'
code
'
:
true
}
);
model
.
insertContent
(
textNode
);
model
.
insertContent
(
textNode
);
}
);
}
);
...
@@ -60,7 +66,7 @@ export default class MathJaxCodeDelimiters extends Plugin {
...
@@ -60,7 +66,7 @@ export default class MathJaxCodeDelimiters extends Plugin {
// position of the cursor.
// position of the cursor.
this
.
listenTo
(
view
,
'
execute
'
,
()
=>
{
this
.
listenTo
(
view
,
'
execute
'
,
()
=>
{
model
.
change
(
writer
=>
{
model
.
change
(
writer
=>
{
const
textNode
=
writer
.
createText
(
'
`
$$ $$
`
'
);
const
textNode
=
writer
.
createText
(
'
$$ $$
'
,
{
'
code
'
:
true
}
);
model
.
insertContent
(
textNode
);
model
.
insertContent
(
textNode
);
}
);
}
);
...
...
This diff is collapsed.
Click to expand it.
src/index.js
+
1
−
10
View file @
ea71a653
import
displayIcon
from
'
../theme/icons/display.svg
'
;
export
{
default
as
ComplexitywikiPlugins
}
from
'
./complexitywiki_plugins
'
;
import
inlineIcon
from
'
../theme/icons/inline.svg
'
;
export
{
MathJaxCodeDelimiters
}
from
'
./mathjax_code_delimiters
'
;
// export { CaosDBReferenceLink } from './caosdb_reference_link';
export
const
icons
=
{
displayIcon
,
inlineIcon
};
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