Sounds like maybe the default CSS should do some preservation of whitespace in the viewer, though.
Care to open an issue about it? On Apr 24, 2014 12:40 AM, "Gong Huaiyu James (NCS)" <[email protected]> wrote: > Hi, team: > > Just replace shift+enter (chr(13) ) into HTML <br/>. > > It works for me. The following code works fine for me. > > .subscribe("annotationViewerTextField", function > (field,annotation) { > var innerText=field.innerHTML; > innerText=innerText.replace(/\r?\n|\r/g, > "<br/>"); > field.innerHTML=innerText; > > }) > > > > > > > -----Original Message----- > From: annotator-dev [mailto:[email protected]] On > Behalf Of [email protected] > Sent: Thursday, 24 April 2014 12:41 PM > To: [email protected] > Subject: annotator-dev Digest, Vol 36, Issue 11 > > Send annotator-dev mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.okfn.org/mailman/listinfo/annotator-dev > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of annotator-dev digest..." > > > Today's Topics: > > 1. Carriage return in Viewer and Editor (Gong Huaiyu James (NCS)) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 24 Apr 2014 04:40:55 +0000 > From: "Gong Huaiyu James (NCS)" <[email protected]> > To: "[email protected]" <[email protected]> > Subject: [annotator-dev] Carriage return in Viewer and Editor > Message-ID: > <a519a4e10b8b8e43bc553d52631ea29242cd9...@sgmbx04.ncs.corp.int-ads > > > Content-Type: text/plain; charset="us-ascii" > > > Hi, Team: > I can use "Shift+Enter" to add carriage return in the > annotator editor . I have three lines text in the editor. > But when I view the annotator , three lines become one line. > Any steps I missed when view the multiple line text in the > viewer? > > > Thanks > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: editWithCarriageReturn.png > Type: image/png > Size: 14512 bytes > Desc: editWithCarriageReturn.png > URL: < > https://lists.okfn.org/pipermail/annotator-dev/attachments/20140424/92beaf89/attachment.png > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: ViewwithCarriageReturn.png > Type: image/png > Size: 12613 bytes > Desc: ViewwithCarriageReturn.png > URL: < > https://lists.okfn.org/pipermail/annotator-dev/attachments/20140424/92beaf89/attachment-0001.png > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > annotator-dev mailing list > [email protected] > https://lists.okfn.org/mailman/listinfo/annotator-dev > Unsubscribe: https://lists.okfn.org/mailman/optionss/annotator-dev > > > ------------------------------ > > End of annotator-dev Digest, Vol 36, Issue 11 > ********************************************* > _______________________________________________ > annotator-dev mailing list > [email protected] > https://lists.okfn.org/mailman/listinfo/annotator-dev > Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev >
_______________________________________________ annotator-dev mailing list [email protected] https://lists.okfn.org/mailman/listinfo/annotator-dev Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
