게시판 글쓰기
기존 textarea에 씌우면 끝. 폼 전송, 수정 화면, 필수 입력 확인까지 그대로 둡니다.
Editor82.createEditor('#content', {
toolbar: 'board',
uploadUrl: '/upload.php',
});기존 textarea에 씌우면 끝. 폼 전송, 수정 화면, 필수 입력 확인까지 그대로 둡니다.
Editor82.createEditor('#content', {
toolbar: 'board',
uploadUrl: '/upload.php',
});넓은 이미지, 가운데 정렬, 표로 만든 상품 정보. 상세 페이지 폭에 맞춰 편집 영역을 맞춥니다.
createEditor('#detail', {
contentStyle: 'body { max-width: 860px; margin: auto }',
uploadImage: uploadToS3,
});제목, 인용, 코드 블록, 동영상. 마크다운에 익숙하면 ## 이나 ``` 로 바로 씁니다.
createEditor('#post', {
toolbar: 'basic',
height: 'auto',
autosave: true,
});공지·약관·FAQ처럼 자주 쓰는 양식은 템플릿으로. 줄간격과 글자 크기는 한국 문서 기준(%·pt)입니다.
createEditor('#notice', {
templates: [{ title: '점검 공지', html }],
fontSizeUnit: 'pt',
});<p class=MsoNormal style='line-height:150%'>
<b><span style='font-size:14.0pt;font-family:"맑은 고딕";
mso-bidi-font-family:"Times New Roman"'>3분기 보고서</span></b>
<o:p></o:p></p>
<p class=MsoListParagraph style='mso-list:l0 level1 lfo1'>
span>1.<span> </span></span>
o:p></o:p></p><p style="line-height: 150%">
<strong><span style="font-size: 14pt">3분기 보고서</span></strong>
</p>
<ol>
<li>매출 12% 증가</li>
</ol>같은 textarea, 같은 필드 이름. 서버 코드는 손대지 않고 스크립트 몇 줄만 바꿉니다. 기존 글도 그대로 열립니다.
<textarea name="ir1" id="ir1"></textarea>
<script src="/se2/js/service/HuskyEZCreator.js"></script>
<script>
var oEditors = [];
nhn.husky.EZCreator.createInIFrame({
oAppRef: oEditors, elPlaceHolder: 'ir1',
sSkinURI: '/se2/SmartEditor2Skin.html',
});
function submitContents() {
oEditors.getById['ir1'].exec('UPDATE_CONTENTS_FIELD', []);
document.forms[0].submit();
}
</script><textarea name="ir1" id="ir1"></textarea>
<link rel="stylesheet" href="https://82editor.com/cdn/v1.0.0/82editor.css">
<script src="https://82editor.com/cdn/v1.0.0/82editor.min.js"></script>
<script>
Editor82.createEditor('#ir1', { toolbar: 'board', uploadUrl: '/upload.php' });
// textarea is kept in sync automatically: no UPDATE_CONTENTS_FIELD
function submitContents() { document.forms[0].submit(); }
</script><script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<link href="summernote-lite.min.css" rel="stylesheet">
<script src="summernote-lite.min.js"></script>
<textarea id="summernote" name="content"></textarea>
<script>
$('#summernote').summernote({
height: 400,
callbacks: { onImageUpload: (files) => upload(files[0]) },
});
const html = $('#summernote').summernote('code');
</script><link rel="stylesheet" href="https://82editor.com/cdn/v1.0.0/82editor.css">
<script src="https://82editor.com/cdn/v1.0.0/82editor.min.js"></script>
<textarea id="summernote" name="content"></textarea>
<script>
const editor = Editor82.createEditor('#summernote', {
height: 400,
uploadImage: (file) => upload(file), // return the image URL
});
const html = editor.getHTML();
</script>스마트에디터 2 옮기기 안내Summernote 옮기기 안내Toast UI Editor 대안CKEditor 4 대안
<link rel="stylesheet" href="https://82editor.com/cdn/v1.0.0/82editor.css">
<script src="https://82editor.com/cdn/v1.0.0/82editor.min.js"></script>
<textarea id="content" name="content"></textarea>
<script>
Editor82.createEditor('#content', { toolbar: 'board', height: 400 });
</script>import { createEditor } from '@82editor/core';
import '@82editor/core/styles.css';
const editor = createEditor('#editor', {
placeholder: '내용을 입력하세요',
toolbar: 'board',
height: 400,
});
editor.on('change', (html) => console.log(html));import { useState } from 'react';
import { Editor82 } from '@82editor/react';
import '@82editor/core/styles.css';
export function WriteForm() {
const [html, setHtml] = useState('');
return <Editor82 value={html} onChange={setHtml} options={{ toolbar: 'board', height: 400 }} />;
}<script setup>
import { ref } from 'vue';
import { Editor82 } from '@82editor/vue';
import '@82editor/core/styles.css';
const html = ref('');
</script>
<template>
<Editor82 v-model="html" :options="{ toolbar: 'board', height: 400 }" />
</template><script>
import { Editor82 } from '@82editor/svelte';
import '@82editor/core/styles.css';
let html = $state('');
</script>
<Editor82 bind:value={html} options={{ toolbar: 'board', height: 400 }} />import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { Editor82Component } from '@82editor/angular';
@Component({
selector: 'app-write',
standalone: true,
imports: [FormsModule, Editor82Component],
template: `<editor-82 [(ngModel)]="html" [options]="{ toolbar: 'board', height: 400 }"></editor-82>`,
})
export class WriteComponent {
html = '';
}
// angular.json → "styles": ["node_modules/@82editor/core/dist/styles.css"]가입도 키도 필요 없습니다. 회사 사이트도 무료입니다.
시작하기