'Editor'에 해당되는 글 3건

  1. 2020.05.21 [Ace] ace editor json beautify 하기
  2. 2011.12.09 [해커스매일실정VOCA] 12월 9일
  3. 2009.07.22 [무료에이터]

[Ace] ace editor json beautify 하기

ITWeb/개발일반 2020. 5. 21. 10:23

참고문서)

https://ace.c9.io/#nav=howto

 

필요한 JS 파일) 필요한 resource 모두 받아 두었습니다.

<script src="/statics/js/ace/ace.js"></script>
<script src="/statics/js/ace/ext-beautify.js"></script>

 

Editor DIV)

<div id="shadowStateEditor" style="width:100%; height:300px;">
{
  "state": {
    "reported": {
      "welcome": "Ace World"
    }
  }
}
</div>

 

Javascript) 설정 및 적용

// res.data 는 ajax 처리 후 success 에서 넘겨 받은 json 데이터 입니다.

ace.edit("shadowStateEditor").setValue(
  JSON.stringify(
    JSON.parse(res.data), null, 2
  )
);

drawShadowStateEditor();

function drawShadowStateEditor(){
  var beautify = ace.require("ace/ext/beautify");
  var editor = ace.edit("shadowStateEditor");

  editor.setTheme("ace/theme/nord_dark");
  editor.session.setMode("ace/mode/json");
  editor.setShowInvisibles(false);
  editor.setReadOnly(true);
  editor.setShowPrintMargin(false);
  editor.session.setTabSize(2);
  editor.session.setUseSoftTabs(true);
  editor.session.setUseWrapMode(true);

  beautify.beautify(editor.session);

  editor.resize();
}

 

:

[해커스매일실정VOCA] 12월 9일

Legacy 2011. 12. 9. 17:50
오늘의 학습

1. The president made a difficult situation even worse.

상황


2. Mercury is the smallest planet in the solar system and the closest to the Sun

행성


3. Sarah Hale became one of the most famous magazine editors in the United States during the 1800's.

편집자

 
:

[무료에이터]

ITWeb/스크랩 2009. 7. 22. 12:04

제가 설치해서 사용해 본 것들 입니다.
개인적인 취향으로는 에디터 플러스에 익숙해져 있어서 이넘과 비슷한 스타일의 에디터가 손에 익는다는..
(참고로 개인 라이센스를 구매해서 사용하고 있으나 회사에서는 사용을 못하고 있다는...ㅡ.ㅜ;;)

1. Note Pad Plus (Notpad++)
http://notepad-plus.sourceforge.net/

2. PSPad
http://www.pspad.com/

3. Crimson Editor
http://www.crimsoneditor.com/

4. AcroEdit
http://www.acrosoft.pe.kr/

5. DesyEdit
http://www.desyedit.com/ko/downloads

6. Context Editor
http://www.contexteditor.org/

7. JEdit
http://www.jedit.org/


이외 검색해 보시면 무료 에디터 많이 나옵니다.
저 위에 있는 에디터 중에서는 개인적으로 1번이 제일 익숙하다고나 할까요..
개인적인 취향이니까.. 입맛에 맞는걸루 쓰심 좋겠죠..
: