cheditor 질문입니다. 정보
cheditor 질문입니다.본문
cheditor에 본문에 이미지 삽입할려면 어떻게 처리해야하나요?
이모티콘 삽입하는 부분은 이부분같은데..
<script type="text/javascript">
//<![CDATA[
var oEditor = parent.chutil.oname;
function insert(img)
{
eval('parent.'+oEditor).doCmdPaste('<img src="'+img.src+'" border="0" style="vertical-align:middle" alt="">');
popupClose();
}
function popupClose() {
eval('parent.'+oEditor).popupWinClose();
}
//]]>
</script>
에디터 기본 사진 넣기는 사진이 cheditor폴더에 저장이 되어서
파일첩부로 올린 사진을 에디터 본문에 삽입 하고 싶습니다.
어떻게 해야하는지 아시는분 도움좀 주십시요~
이모티콘 삽입하는 부분은 이부분같은데..
<script type="text/javascript">
//<![CDATA[
var oEditor = parent.chutil.oname;
function insert(img)
{
eval('parent.'+oEditor).doCmdPaste('<img src="'+img.src+'" border="0" style="vertical-align:middle" alt="">');
popupClose();
}
function popupClose() {
eval('parent.'+oEditor).popupWinClose();
}
//]]>
</script>
에디터 기본 사진 넣기는 사진이 cheditor폴더에 저장이 되어서
파일첩부로 올린 사진을 에디터 본문에 삽입 하고 싶습니다.
어떻게 해야하는지 아시는분 도움좀 주십시요~
댓글 전체
질문이 이해하기가 힘드네요.
글쓰기를 누르면 편집기 안에 기본적으로 그림이 나오게 하고 싶다는 말씀인가요?
그렇다면 write.skin.php에 <?=cheditor2('wr_content', $content);?> 줄 이전에....
$content .= "<img src=\"그림파일\" width=\"가로" height=\"세로\" border=\"0\"><br>";
요렇게만 넣어주시면 기본 이미지가 보이게 됩니다.
글쓰기해도 본문과 함께 기록되겠죠?
글쓰기를 누르면 편집기 안에 기본적으로 그림이 나오게 하고 싶다는 말씀인가요?
그렇다면 write.skin.php에 <?=cheditor2('wr_content', $content);?> 줄 이전에....
$content .= "<img src=\"그림파일\" width=\"가로" height=\"세로\" border=\"0\"><br>";
요렇게만 넣어주시면 기본 이미지가 보이게 됩니다.
글쓰기해도 본문과 함께 기록되겠죠?
제가 질문을 잘못 했네요~
체디터에 swfupload등에서 본문삽입 클릭시 체디터에 이미지 넣는 방법입니다.
체디터에 swfupload등에서 본문삽입 클릭시 체디터에 이미지 넣는 방법입니다.
자문자답
imageArray[num] = new Object();
imageArray[num]['width'] = imageCompletedList[imgBox.id].width;
imageArray[num]['height'] = imageCompletedList[imgBox.id].height;
imageArray[num]['src'] = imgBox.firstChild.src;
imageArray[num]['info'] = imageCompletedList[imgBox.id].info;
ed_wr_content.doInsertImage(imageArray);
이걸 이용했습니다.
imageArray[num] = new Object();
imageArray[num]['width'] = imageCompletedList[imgBox.id].width;
imageArray[num]['height'] = imageCompletedList[imgBox.id].height;
imageArray[num]['src'] = imgBox.firstChild.src;
imageArray[num]['info'] = imageCompletedList[imgBox.id].info;
ed_wr_content.doInsertImage(imageArray);
이걸 이용했습니다.