선택한 텍스트 프레임의 단락마다 콘텐츠를 가져옵니다.
3966 단어 HTMLillustratorextendscriptCSS
• 선택한 텍스트 프레임에서 텍스트 선택 대신 contents를 가져오도록 변경합니다.
・ 정규 표현식에서 단락을 가져오지 않고paragraphis 속성을 통해 변경합니다.
getContents.jsx
var myDoc = app.activeDocument; //ドキュメント
var mySel = myDoc.selection; //選択しているテキストフレーム
for (var i = 0; i < mySel.length; i++) {
var myParaLen = mySel[i].paragraphs.length; //段落数を取得
for (var j = 0; j < myParaLen; j++) {
var myPraContents = mySel[i].paragraphs[j].contents; //段落ごとのコンテンツを取得
alert(myPraContents); //確認用
}
}







얻은 느낌이 매우 좋다.
여기서 단락 스타일 이름(태그 이름), 크기(font-size), 글꼴 패밀리(font-weight), 글꼴 스타일(font-weight), 색상(color), 행 정렬(text-align), 행 간격(line-height)을 얻어 HTML, CSS 생성 도구를 만듭니다.
(사실 이미 다 했어요...)
Reference
이 문제에 관하여(선택한 텍스트 프레임의 단락마다 콘텐츠를 가져옵니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/onebitious/items/556de621ec5d88ae2fae텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)