Files
HeuJung 151a7ae945 fix(extensions,core): 저장 대상이 아닌 편집기가 폼을 변경됨으로 만들지 않게
미리보기 편집기는 설정을 시험해 보는 자리인데, 본문 동기화가 hasChanges 를
렌더를 일으키는 setLocal 로 올리면서 시험 입력만으로 [저장] 이 켜졌다.
어느 편집기가 저장 대상인지는 레이아웃만 알므로 핸들러가 필드명을 알아보게
하지 않고 trackChanges 선언으로 받는다 — 하드코딩하면 다른 확장이 같은
미리보기 패턴을 쓸 때 그대로 재발한다.

같은 결함이 형제 경로에도 있었다. 평문 폴백은 hasChanges 를 본문 배치
(render:false + selfManaged:true)에 실어, 편집기 자산을 못 불러온 환경에서
본문만 고치면 저장 버튼이 잠긴 채로 남았다 — 폐쇄망에서는 그 폴백이 정상
경로다. 폴백은 렌더 시점에도 같은 함수를 부르므로 화면을 여는 것만으로
변경됨이 되지 않도록, 사용자 입력에서 온 호출만 플래그를 올린다.

components.json 생성기는 종결 개행을 PHP_EOL 로 써서 Windows 빌드마다
그 파일을 유령 변경으로 남겼다. 줄 내용이 같아 diff 가 비어 보이므로
무엇이 바뀐 것인지 알 수 없는 변경만 쌓인다.
2026-09-01 21:53:47 +09:00

49 lines
1.6 KiB
JSON

{
"extension_point": "html_editor",
"mode": "replace",
"scripts": [
{
"src": "/api/plugins/assets/sirsoft-ckeditor5/dist/vendor/ckeditor5/43.3.1/ckeditor5.umd.js",
"id": "ckeditor5_script"
}
],
"components": [
{
"id": "ckeditor5_container",
"type": "basic",
"name": "Div",
"props": {
"id": "ckeditor5-{{extensionPointProps.name ?? 'content'}}",
"className": "ckeditor5-wrapper"
},
"lifecycle": {
"onMount": [
{
"handler": "sirsoft-ckeditor5.initEditor",
"params": {
"name": "{{extensionPointProps.name ?? 'content'}}",
"content": "{{extensionPointProps.content ?? extensionPointProps.value ?? ''}}",
"multilingual": "{{extensionPointProps.multilingual ?? false}}",
"placeholder": "{{extensionPointProps.placeholder ?? ''}}",
"readOnly": "{{_computed.isReadOnly ?? extensionPointProps.disabled ?? extensionPointProps.readOnly ?? false}}",
"imageUpload": "{{_global.plugins['sirsoft-ckeditor5']?.imageUpload ?? false}}",
"height": "{{_global.plugins['sirsoft-ckeditor5']?.editorHeight ?? 400}}",
"toolbar": "{{_global.plugins['sirsoft-ckeditor5']?.toolbar ?? 'standard'}}",
"trackChanges": "{{extensionPointProps.trackChanges ?? true}}"
}
}
],
"onUnmount": [
{
"handler": "sirsoft-ckeditor5.destroyEditor",
"params": {
"name": "{{extensionPointProps.name ?? 'content'}}"
}
}
]
}
}
],
"priority": 100
}