|
风大可以参照这个调整一下,看能不能实现这个功能
6 M1 j$ |8 D; u- k4 x! M; W3 c* T: G( f9 J8 d
http://www.webos-internals.org/w ... 2_To_Create_Newline
3 `7 @9 _$ O; X, `" G) K* I+ r/ e" v; l. w( Z. J6 F
1. Log in as root.
' s& z9 t; a o: t 2. Mount the file system as RW.0 Y7 r9 F# W8 u9 _9 ]4 V
3. Enter the /usr/palm/applications/com.palm.app.messaging/app/controllers directory.
6 A' t% w- u- g 4. Change compose-assistant.js (line 87) and chatview-assistant.js (line 100) and set enterSubmits to be false./ B4 J7 U6 O s! m
5. In the handleTextAreaKeyUp function in compose-assistant.js (lines 278 to 283) and chatview-assistant.js (lines 1678 to 1683), comment out the following lines:7 I, z2 [5 ?$ T( a3 h( U1 f
this.considerForSend();. L* k: P, X+ U
Event.stop(event);
: M# B6 F. }8 b( Y6 [# P 6.To actually display newlines in the chatview: In chatview-assistant.js, in the ChatviewAssisant::preFormatChatList method (around line 1220), locate the lines:
, A* |" ]' X. G4 ~! u* J if(msg.messageText && !ChatFlags.isTransient(msg.flags)) {
# @! |. c$ V) _; h9 ^ msg.messageText = msg.messageText.escapeHTML();/ _3 u% `" z2 e" m
and add the following just after:, C2 u' s6 o R1 y" o# ]5 j
msg.messageText = msg.messageText.replace(/\n/g,"<br>");# u! \1 w4 D# c2 O A1 a
7.Mount the file system as RO.
" \. ^6 |! S2 C9 `, p3 F+ O 8.Reboot.6 b l4 |. E' {
( ~$ C c, D( `+ Y( `% P
这个是为了输入回车,我在1.2中改了的,可行,其中替换回车那里看是否可替换空格 |
|