Examples of renderAsHtml()


Examples of flow.netbeans.markdown.api.Renderable.renderAsHtml()

                    RenderOption.PREFER_EDITOR,
                    RenderOption.RESOLVE_IMAGE_URLS);
            if (!htmlView.isHtmlFullySupported()) {
                renderOptions.add(RenderOption.SWING_COMPATIBLE);
            }
            previewText = renderable.renderAsHtml(renderOptions);
        } catch (IOException ex) {
            previewText = "Preview rendering failed: " + ex.getMessage();
        }
        return previewText;
    }
View Full Code Here

Examples of flow.netbeans.markdown.api.Renderable.renderAsHtml()

            Renderable renderable = context.getLookup().lookup(Renderable.class);

            Set<RenderOption> renderOptions = EnumSet.of(
                    RenderOption.PREFER_EDITOR,
                    RenderOption.RESOLVE_IMAGE_URLS);
            String htmlText = renderable.renderAsHtml(renderOptions);

            File temp = File.createTempFile("preview-" + context.getPrimaryFile().getName(), ".html");
            temp.deleteOnExit();

            // get file encoding
View Full Code Here

Examples of flow.netbeans.markdown.api.Renderable.renderAsHtml()

    public void actionPerformed(ActionEvent ev) {
        try {
            Renderable renderable = context.getLookup().lookup(Renderable.class);

            Set<RenderOption> renderOptions = Collections.emptySet();
            String htmlText = renderable.renderAsHtml(renderOptions);
            String saveTo = MarkdownGlobalOptions.getInstance()
                    .isSaveInSourceDir() ? context.getPrimaryFile()
                            .getParent().getPath() : "user.home";
            JFileChooser fileChooser = new JFileChooser(saveTo);
            int option = fileChooser.showSaveDialog(fileChooser);
View Full Code Here

Examples of org.olat.ims.qti.editor.beecom.objects.Material.renderAsHtml()

          }

          // update view
          RichTextElement text = textElements.get(mat);
          //the html code is embbeded in the panel and as not a proper baseurl
          text.setValue(mat.renderAsHtml(mediaBaseUrl));
          // serialize document
          qtiPackage.serializeQTIDocument();
        }
        // dispose controllers
        dialogCtr.deactivate();
View Full Code Here

Examples of org.olat.ims.qti.editor.beecom.objects.Material.renderAsHtml()

        ChoiceResponse response = (ChoiceResponse) obj;
        // response-level feedback
        Material responseFeedbackMat = QTIEditHelper.getFeedbackOlatRespMaterial(item, response.getIdent());
        responseFeedbackMat = responseFeedbackMat == null ? new Material() : responseFeedbackMat;
        identities.put(responseFeedbackMat, response.getIdent());
        RichTextElement responseHintText = uifactory.addRichTextElementForStringData("feedback_" + i, null, responseFeedbackMat
            .renderAsHtml(mediaBaseUrl), 4, -1, true, true, baseContainer, null, responseLevelHintsLayout, ureq.getUserSession(),
            getWindowControl());
        FormLink link = uifactory.addFormLink("link_" + i, responseLevelHintsLayout, Link.NONTRANSLATED + Link.LINK_CUSTOM_CSS);
        ((Link) link.getComponent()).setCustomDisplayText("");
        ((Link) link.getComponent()).setCustomEnabledLinkCSS("b_small_icon b_edit_icon");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.