OLD | NEW |
1 <!-- Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 <!-- Copyright (c) 2014 The Chromium Authors. All rights reserved. |
2 Use of this source code is governed by a BSD-style license that can be | 2 Use of this source code is governed by a BSD-style license that can be |
3 found in the LICENSE file. --> | 3 found in the LICENSE file. --> |
4 | 4 |
5 <script src="../lib/ba-linkify.js"></script> | 5 <script src="../lib/ba-linkify.js"></script> |
6 <script src="../link_text_parser.js"></script> | 6 <script src="../link_text_parser.js"></script> |
7 | 7 |
8 <polymer-element name="cr-linkified-text" attributes="text"> | 8 <polymer-element name="cr-linkified-text" attributes="text"> |
9 <template><link rel="stylesheet" href="common.css"><style> | 9 <template><link rel="stylesheet" href="common.css"><style> |
10 :host([pre]) { | 10 :host([pre]) { |
11 white-space: pre-wrap; | 11 white-space: pre-wrap; |
12 word-wrap: break-word; | 12 word-wrap: break-word; |
13 font-family: Monaco, monospace; | 13 font-family: Menlo, Monaco, monospace; |
14 } | 14 } |
15 | 15 |
16 img { | 16 img { |
17 margin: 0.5em 16px; | 17 margin: 0.5em 16px; |
18 } | 18 } |
19 </style><div id="output"></div></template> | 19 </style><div id="output"></div></template> |
20 <script> | 20 <script> |
21 Polymer("cr-linkified-text", { | 21 Polymer("cr-linkified-text", { |
22 created: function() { | 22 created: function() { |
23 this.text = ""; | 23 this.text = ""; |
(...skipping 21 matching lines...) Expand all Loading... |
45 output.appendChild(a); | 45 output.appendChild(a); |
46 } else { | 46 } else { |
47 output.appendChild(document.createTextNode(text)); | 47 output.appendChild(document.createTextNode(text)); |
48 } | 48 } |
49 }); | 49 }); |
50 parser.parse(newValue); | 50 parser.parse(newValue); |
51 }, | 51 }, |
52 }); | 52 }); |
53 </script> | 53 </script> |
54 </polymer-element> | 54 </polymer-element> |
OLD | NEW |