Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titlee
{
	editor: SynapEditor,
	eventType:  'beforeOpenDocument',
	cancelable: true,
	returnValue: null,
	fileType: 'WORD', // 파일 타입 ('HTML', 'WORD', 'CELL', ...)
	fileName: 'filename.docx' // 파일 이름
}


API

event.setApi(api)

Status
colourYellow
title릴리즈 2.7.0 이상

이벤트 객체를 통해 임포트 API를 설정할 수 있습니다.

Code Block
languagejs
{
    beforeOpenDocument: function (e) {
		e.setApi('newUploadURL');
    }
}

event.setFileFieldName(fileFieldName)

Status
colourYellow
title릴리즈 2.7.0 이상

이벤트 객체를 통해 form date fieldName을 설정할 수 있습니다. (기본값: 'file')

Code Block
languagejs
{
    beforeOpenDocument: function (e) {
		e.setFileFieldName('file');
    }
}

event.addHeader(key, value)

Status
colourYellow
title릴리즈 2.7.0 이상

이벤트 객체를 통해 Request Header를 설정할 수 있습니다.

Code Block
languagejs
{
    beforeOpenDocument: function (e) {
		e.addHeader('X-Hello', 'World');
    }
}

event.addParameter(key, value)

Status
colourYellow
title릴리즈 2.7.0 이상

이벤트 객체를 통해 Parameter를 설정할 수 있습니다.

Code Block
languagejs
{
    beforeOpenDocument: function (e) {
		e.addParameter('hello', 'world');
    }
}