릴리즈 2.6.0 이상
HTML을 삽입합니다.
파라메터에 ID가 존재할 경우 ID와 Offset에 해당하는 위치에 삽입됩니다.
ID가 존재하지 않을 경우 현재 Selection을 기준으로 다음 문단에 삽입됩니다.
Parameters:
Name | Type | Description |
---|---|---|
html | String | 삽입할 HTML 문자열 |
id | String | HTML을 삽입 할 문단의 ID |
offset | Number | HTML을 삽입할 위치 (offset [default = 0]) |
릴리즈 2.11.0 이상 forceRender | Boolean | 즉시 렌더링할지 여부 (기본값 true) |
Example:
var html = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" viewBox="0 0 130.67 131.67" style="width: 100%; height: 100%; transform: matrix(1, 0, 0, 1, 0, 0); left: 0px; top: 0px;"><g transform="translate(1.335, 1.335)"><path stroke-width="2.67" d="M 0,64.5 A 64,64.5 0 0,1 64,0 A 64,64.5 0 0,1 128,64.5 A 64,64.5 0 0,1 64,129 A 64,64.5 0 0,1 0,64.5 Z " stroke="rgb(79, 129, 189)" stroke-dasharray="" fill="rgb(247, 150, 70)" vector-effect="non-scaling-stroke"></path></g></svg>'; editor.insertHTML(html);
Example2:
var html = 'html Content'; editor.insertHTML(html, id, offset);
Demo:
// html <p id='sign'> </p> // javascript var html = '<img src='https://synapeditor.com/wp-content/uploads/2019/08/newvalue_01.png' style='width:50px; height:50px;'>'; var paragraphId = 'sign'; editor.insertHTML(html, paragraphId);
개 인 지 출 결 의 서
(주)사이냅소프트 | | 결제 | 담당 | 팀장 | |||
작성일 | | | | | |||
부서 | | 작성자 | | |
날짜 | 계정명 | 금액 | 사용내역 | |
신용카드 사용분 (연말 소득공제 불가) | ||||
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
소계 | ₩0 | |||
일반 영수증 사용분 (개인 현금영수증 불가) | ||||
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
소계 | ₩0 | |||
지출총계 | ₩0 |
경영지원팀 | 담당 | 팀장 | 영수 |
| | |