-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CKEditor 5 추가 지원 #85
Labels
Comments
기존 에디터툴을 사용할 수 없는 문제가 있습니다.
|
Xpressengine core 수정 필요 이 함수를 아래의 코드를 덮어씌우고 async create (sel, options, editorOptions, toolInfoList) {
toolInfoList = toolInfoList || []
editorOptions = $.extend(this.configs || {}, editorOptions || {})
if (EditorValidation.isValidBeforeCreateInstance(sel, toolInfoList, this)) {
const editorIntance = new EditorInstance(this.name, sel, editorOptions, toolInfoList)
editorIntance._editor = this
this.editorList[sel] = editorIntance
var result = this.initialize.call(this.editorList[sel], sel, options, editorOptions)
if (result instanceof Promise) {
await result
}
if (!!toolInfoList && toolInfoList.length > 0) {
let tools = {}
let toolInfoListFilter = []
for (let i = 0, max = toolInfoList.length; i < max; i += 1) {
if (window.XEeditor.getTool(toolInfoList[i].id)) {
tools[toolInfoList[i].id] = window.XEeditor.getTool(toolInfoList[i].id)
toolInfoListFilter.push(toolInfoList[i])
} else {
console.error('define된 tool이 존재하지 않음. [' + toolInfoList[i].id + ']')
}
}
if (this.addTools && typeof this.addTools === 'function') {
this.addTools.call(this.editorList[sel], tools, toolInfoListFilter)
}
}
this.$$emit('editor.created', this.editorList[sel])
return this.editorList[sel]
}
}
} js를 build 해야합니다. cd resources/assets
npm i
npm run align |
highk
added a commit
that referenced
this issue
Feb 9, 2023
- 설정에서 지정한 css file을 불러올 수 없는 문제 수정 - HTML 편집, 툴바 사용 권한이 적용되지 않는 문제 수정 - 펼치기 옵션 추가 - 전체화면 기능 추가 - redo, undo, code 툴바 버튼 추가
comment에서 사용하기 위해서는 service.js 코드를 수정해야 합니다. https://github.com/xpressengine/plugin-comment/blob/develop/assets/js/service.js#L705-L726 아래 코드로 대체해주세요. initEditor: function () {
if (typeof (XEeditor) === 'undefined') {
return
}
var that = this
var id = 'comment_textarea_' + (new Date().getTime())
$('textarea', this.dom).attr('id', id).css('width', '100%')
window.XE.app('Editor').then(function renderEditor (appEditor) {
appEditor.getEditor(that.editorData.name).then(function createEditor (editor) {
that.editor = editor.create(id, that.editorData.options, that.editorData.customOptions, that.editorData.tools)
if(that.editor instanceof Promise) {
that.editor.then(function (editor) {
that.editor = editor;
that.editor.on('focus', function focusCallback () {
$(id).triggerHandler('focus')
})
that.editor.on('change', function changeCallback () {
$(id).triggerHandler('input')
})
})
} else {
that.editor.on('focus', function focusCallback () {
$(id).triggerHandler('focus')
})
that.editor.on('change', function changeCallback () {
$(id).triggerHandler('input')
})
}
})
})
}, |
4604661 이 커밋 에 |
highk
added a commit
that referenced
this issue
Feb 9, 2023
highk
added a commit
that referenced
this issue
Feb 13, 2023
현재, 소스코드 보기 상태에서 펼치기 기능이 동작하지 않는 문제가 있습니다. |
highk
added a commit
that referenced
this issue
Feb 13, 2023
highk
added a commit
that referenced
this issue
Feb 13, 2023
highk
added a commit
that referenced
this issue
Feb 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
XE 에디터에 CKEditor 5 를 추가합니다.
The text was updated successfully, but these errors were encountered: