[annotator-dev] Solution for Carriage return in Viewer

Randall Leeds tilgovi at hypothes.is
Thu Apr 24 20:22:39 UTC 2014


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)" <jamesh at ncs.com.sg>
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:annotator-dev-bounces at lists.okfn.org] On
> Behalf Of annotator-dev-request at lists.okfn.org
> Sent: Thursday, 24 April 2014 12:41 PM
> To: annotator-dev at lists.okfn.org
> Subject: annotator-dev Digest, Vol 36, Issue 11
>
> Send annotator-dev mailing list submissions to
>         annotator-dev at lists.okfn.org
>
> 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
>         annotator-dev-request at lists.okfn.org
>
> You can reach the person managing the list at
>         annotator-dev-owner at lists.okfn.org
>
> 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)" <jamesh at ncs.com.sg>
> To: "annotator-dev at lists.okfn.org" <annotator-dev at lists.okfn.org>
> Subject: [annotator-dev] Carriage return in Viewer and Editor
> Message-ID:
>         <A519A4E10B8B8E43BC553D52631EA29242CD9C81 at 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
> annotator-dev at lists.okfn.org
> 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
> annotator-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/annotator-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20140424/9240f6a2/attachment-0004.html>


More information about the annotator-dev mailing list