2012-10-30 7 views
0

내가로드 된 페이지를 볼 때 내가 어떻게 할 수있는이텍스트 영역

enter image description here

를 참조

%textarea.email_copy 
    Hi <awesome friend>, 

    I am using this site called XXXX, and you should check it out. It is for smart and thoughtful people to share about their experiences and ideas around topics they care about, and I think you are perfect for it. 

    I generated a special invite for you: 

    http://some_link 

    <%= current_user.getFirstName() %> 

그러나 텍스트 영역에 기본적으로 텍스트를 추가하고 텍스트를 포맷하는 방법 단락 사이에 단락이나 간격을 추가합니까?

+3

스팸 엔진을 만들고 있습니까? –

+1

@AlexisPigeon 잘 쓰려면이 방법을 쓰십시오. – climbage

+0

@AlexisPigeon, 아니요, 여기 엔진을 만들지 않습니다. 실제로 친구에게 사용하도록 초대하려면이 이메일 사본을 복사하여 붙여 넣으라고 사용자에게 요청합니다. 사이트. 하지만 이것에 약간의 서식을 추가하는 것이 도움이 될 것이라고 생각합니다. – Zhen

답변

1

텍스트 영역에 마크 업을 사용할 수 없습니다. 프리젠 테이션 만 입력하고 싶지 않다면 div는 잘해야합니다. 프레젠테이션과 입력을 모두 원한다면 RTE를 살펴 봐야합니다. 여기

+0

사용자가 자신의 이메일 작성자에게 텍스트를 쉽게 복사하여 붙여 넣기를 원합니다. – Zhen

2

확인 : http://cheat.errtheblog.com/s/haml/

~ - Ruby expression preserving whitespace, e.g. %pre~ @content.body 
    Works just like =, but calls the find_and_preserve helper to keep 
    line breaks intact in the output. 

희망하는 데 도움이됩니다.