Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

릴리즈 2.6.0 이상

사이냅 에디터에 커스텀 아이콘을 설정할 수 있습니다.


관련 API


설정하기

SynapEditor.addIcons(Object) API를 사용하여 커스텀한 아이콘을 <img> 또는 <svg> 태그 형태로 추가합니다.

(사이냅 에디터를 new 로 생성하기 이전에 설정되어야 합니다.)

Javascript (v2.2.0 이상)
<script>
		var customIcons = {
			'bold': '<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfjCgsALRGLLyYxAAAA+klEQVQoz23QsUpCARTG8d+VUKi5VSiiJbU3aRaxbHWpl8gKREvJcHPzKSICH6GrQ21RU0um1HKlhpua1n855/Cdw3f4mJLT0Dc2FrqUtUBK20SooqSkom+iJTWX77zJC2YHgYKhW8l4bHuTsUzOUCtuJvL+oyiSoSEUoKwzkzrKCAxc0HcC1m3PFratg1PhirRH8Op1tvDwUx+lE/z6fpnAV8KTLXCsahWsqToCW5641Bdgz6dnXV0vPuwhYaBOVqQANtX09NRsgAORHbg2lPvjv+tdcxr1raHiQtT73t1MoybpSmTgzKFD5wYizbkck3EhNDJyrx57wzdY0kmPqLwnIgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOS0xMC0xMVQwMDo0NToxNyswMDowMMdG+k0AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTktMTAtMTFUMDA6NDU6MTcrMDA6MDC2G0LxAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg=="/>',
			'italic': '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 315 315"><polygon style="fill:#005ECE;" points="280,40 280,0 140,0 140,40 180.955,40 91.228,275 35,275 35,315 175,315 175,275   134.045,275 223.772,40 "/></svg>'
		};
		SynapEditor.addIcons(customIcons);  // 커스텀 아이콘 설정
 
		window.editor = new SynapEditor('synapEditor', synapEditorConfig);
</script>


  • No labels