-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#85) CKEditor 5 기능 추가 및 Editor config 호환 수정
- 설정에서 지정한 css file을 불러올 수 없는 문제 수정 - HTML 편집, 툴바 사용 권한이 적용되지 않는 문제 수정 - 펼치기 옵션 추가 - 전체화면 기능 추가 - redo, undo, code 툴바 버튼 추가
- Loading branch information
Showing
13 changed files
with
215 additions
and
27 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
assets/ckeditor5-36.0.0/src/plugins/ckeditor5-fullscreen/FullScreen.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; | ||
import ImageFullBig from './icons/fullscreen-big.svg'; | ||
import ImageFullCancel from './icons/fullscreen-cancel.svg'; | ||
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; | ||
import './css/style.css'; | ||
|
||
export default class FullScreen extends Plugin { | ||
init() { | ||
const editor = this.editor; | ||
|
||
editor.ui.componentFactory.add( 'fullScreen', locale => { | ||
const view = new ButtonView( locale ); | ||
let etat = 0; //si 0 position normale | ||
view.set( { | ||
label: 'Plein écran', | ||
icon: ImageFullBig, | ||
tooltip: true | ||
} ); | ||
|
||
// Callback executed once the image is clicked. | ||
view.on( 'execute', () => { | ||
if(etat==1){ | ||
editor.sourceElement.nextElementSibling.removeAttribute('id'); | ||
document.body.removeAttribute('id'); | ||
view.set( { | ||
label: 'Plein écran', | ||
icon: ImageFullBig, | ||
tooltip: true | ||
} ); | ||
etat=0; | ||
}else{ | ||
editor.sourceElement.nextElementSibling.setAttribute("id", 'fullscreeneditor'); | ||
document.body.setAttribute("id", "fullscreenoverlay"); | ||
view.set( { | ||
label: 'Mode Normal', | ||
icon: ImageFullCancel, | ||
tooltip: true | ||
} ); | ||
etat=1; | ||
} | ||
|
||
} ); | ||
|
||
return view; | ||
} ); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
assets/ckeditor5-36.0.0/src/plugins/ckeditor5-fullscreen/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Fullscreen for CKEditor 5 classic editor build | ||
|
||
|
||
``` | ||
npm i -D @ckeditor/ckeditor5-core | ||
npm i -D @ckeditor/ckeditor5-ui | ||
``` | ||
|
||
|
||
|
||
Include in your ckeditor.js | ||
|
||
``` | ||
import FullScreen from './FullScreen'; | ||
``` | ||
|
||
Include in the plugin List | ||
ClassicEditor.builtinPlugins = [ | ||
.... | ||
FullScreen, | ||
]; | ||
``` | ||
And include it in your toolbar | ||
``` | ||
ClassicEditor.defaultConfig = { | ||
toolbar: { | ||
items: [ | ||
....., | ||
'fullScreen' | ||
] | ||
}, | ||
``` |
14 changes: 14 additions & 0 deletions
14
assets/ckeditor5-36.0.0/src/plugins/ckeditor5-fullscreen/css/style.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#fullscreenoverlay{ | ||
overflow: hidden; | ||
} | ||
#fullscreeneditor{ | ||
position: fixed !important; | ||
top:0; | ||
left: 0; | ||
right:0; | ||
bottom: 0; | ||
z-index:1000; | ||
} | ||
#fullscreeneditor .ck-editor__editable.ck-rounded-corners.ck-editor__editable_inline, #fullscreeneditor .ck.ck-editor__main { | ||
height: 100%; | ||
} |
1 change: 1 addition & 0 deletions
1
assets/ckeditor5-36.0.0/src/plugins/ckeditor5-fullscreen/icons/fullscreen-big.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
...s/ckeditor5-36.0.0/src/plugins/ckeditor5-fullscreen/icons/fullscreen-cancel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters