Class mxHtmlTextShape

java.lang.Object
com.mxgraph.shape.mxHtmlTextShape
All Implemented Interfaces:
mxITextShape

public class mxHtmlTextShape extends Object implements mxITextShape
To set global CSS for all HTML labels, use the following code:
mxGraphics2DCanvas.putTextShape(mxGraphics2DCanvas.TEXT_SHAPE_HTML,
  new mxHtmlTextShape()
  {
    protected String createHtmlDocument(Mapinvalid input: '<'String, Object> style, String text)
    {
      return mxUtils.createHtmlDocument(style, text, 1, 0,
          "invalid input: '<'style type=\"text/css\">.selectRef { " +
          "font-size:9px;font-weight:normal; }");
    }
  }
);
  • Field Details

    • replaceHtmlLinefeeds

      protected boolean replaceHtmlLinefeeds
      Specifies if linefeeds should be replaced with breaks in HTML markup. Default is true.
  • Constructor Details

    • mxHtmlTextShape

      public mxHtmlTextShape()
  • Method Details