PY-19960 PY-14096 Merge right-click menu creation for toggle output and split/merge...
[idea/community.git] / python / ipnb / src / org / jetbrains / plugins / ipnb / editor / panels / code / IpnbHtmlPanel.java
1 package org.jetbrains.plugins.ipnb.editor.panels.code;
2
3 import com.intellij.openapi.util.text.StringUtil;
4 import org.jetbrains.annotations.NotNull;
5 import org.jetbrains.annotations.Nullable;
6 import org.jetbrains.plugins.ipnb.IpnbUtils;
7 import org.jetbrains.plugins.ipnb.editor.panels.IpnbFilePanel;
8 import org.jetbrains.plugins.ipnb.format.cells.output.IpnbHtmlOutputCell;
9
10 import javax.swing.*;
11
12 public class IpnbHtmlPanel extends IpnbCodeOutputPanel<IpnbHtmlOutputCell> {
13
14   public IpnbHtmlPanel(@NotNull final IpnbHtmlOutputCell cell, @NotNull final IpnbFilePanel parent,
15                        @Nullable IpnbCodePanel ipnbCodePanel) {
16     super(cell, parent, ipnbCodePanel);
17   }
18
19   @Override
20   protected JComponent createViewPanel() {
21     final int width = myParent.getWidth();
22     return IpnbUtils.createLatexPane(StringUtil.join(myCell.getHtmls(), ""), width);
23   }
24 }