Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.0.1/d3.v3.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <svg width="500" height="500">
  </svg>
</body>
</html>
 
var svg = d3.select('svg');
svg.append('foreignObject')
  .attr('width', 200)
  .attr('height', 200)
  .attr('x', 50)  .attr('requiredFeatures','http://www.w3.org/TR/SVG11/feature#Extensibility')
  .append('xhtml:p')
        .text("a big chunk of text that should wrap");
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers