|
风大可以参照这个调整一下,看能不能实现这个功能8 N) |; h8 y |( r
o& `+ k& m; `$ f6 P0 y6 O# a ahttp://www.webos-internals.org/w ... 2_To_Create_Newline 0 g8 N9 b+ ^8 r* k( @+ |
; W* z9 f+ F4 d9 \
1. Log in as root.# i0 q. n+ ]4 K
2. Mount the file system as RW.! d+ {* Z0 p8 ~1 T! _( r
3. Enter the /usr/palm/applications/com.palm.app.messaging/app/controllers directory.
! n% e2 Q# \; w 4. Change compose-assistant.js (line 87) and chatview-assistant.js (line 100) and set enterSubmits to be false.
$ p& q! }2 e" G* o; c+ F6 p5 k 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:
3 z, b( {6 G* z9 b0 B( W this.considerForSend();6 @, P2 I& f' G
Event.stop(event);
$ P* @+ T- S4 a4 r. o$ J$ I 6.To actually display newlines in the chatview: In chatview-assistant.js, in the ChatviewAssisant::preFormatChatList method (around line 1220), locate the lines:
' y+ [1 x7 O1 I! L( [ if(msg.messageText && !ChatFlags.isTransient(msg.flags)) { , m& g% s8 ?) T/ r8 j
msg.messageText = msg.messageText.escapeHTML();
" }* ?6 a( H; j. k7 K and add the following just after:
* Y: _/ Y+ k5 j msg.messageText = msg.messageText.replace(/\n/g,"<br>");, j# }* B8 D' j ?% R
7.Mount the file system as RO.
+ |3 r* z. O' L8 V+ i8 p) k 8.Reboot.
; v6 V2 f' t2 `$ E+ y: Q+ j3 a* p1 y7 A, V
这个是为了输入回车,我在1.2中改了的,可行,其中替换回车那里看是否可替换空格 |
|