Placeholder

3.0.0 버전부터 지원, 2.18.0 버전부터 지원합니다.

에디터에 내용이 없을 때 표시할 HTML을 설정할 수 있는 플러그인입니다.

에디터에 내용이 있으면 표시되지 않습니다.

1.00

사용 방법

플러그인 파일 불러오기

<!-- The SynapEditor object must exist for this to take effect,
     so include after the editor script files. -->
<script src="url of placeholder.min.js"></script>

플러그인 구성

에디터에 내용이 없을 때 표시할 HTML 설정

// synapeditor.config.js
//...
'placeholder.config': {
    'html': '<p>Hello Editor!!</p>' // Set HTML as a string
}
// ...

1.00

불투명도 설정

Placeholder에 설정한 HTML의 불투명도를 설정합니다. 값이 클수록 선명하게, 작을수록 흐릿하게 표시됩니다.

값은 0에서 1까지 설정할 수 있습니다. 기본값은 0.3입니다.

// synapeditor.config.js
//...
'placeholder.config': {
    'html': '<p>Hello Editor!!</p>',
    'opacity': 0.3 // Opacity to set on the placeholder (set a value from 0 to 1)
}
// ...
opacity: 0opacity 기본값 (0.3)
opacity 0opacity 0.3
opacity: 0.6opacity: 1
opacity 0.6opacity 1