Examples of PlainTextEditorController


Examples of org.olat.core.commons.editor.plaintexteditor.PlainTextEditorController

        // ------- open velocity container for editing -------
        VelocityContainer vc = (VelocityContainer) infoComponent;
        String velocityTemplatePath  = WebappHelper.getSourcePath()+"/"+vc.getPage();
        VFSLeaf vcContentFile = new LocalFileImpl(new File(velocityTemplatePath));
        boolean readOnly = Settings.isReadOnlyDebug();
        vcEditorController = new PlainTextEditorController(ureq, getWindowControl(), vcContentFile, "utf-8", true, true, null);
        vcEditorController.setReadOnly(readOnly);
        vcEditorController.addControllerListener(this);
        VelocityContainer vcWrap = createVelocityContainer("vcWrapper");
        if (readOnly) vcWrap.contextPut("readOnly", Boolean.TRUE);
        vcWrap.put("editor", vcEditorController.getInitialComponent());
View Full Code Here

Examples of org.olat.core.commons.editor.plaintexteditor.PlainTextEditorController

        if (relFilePath.endsWith(".html") || relFilePath.endsWith(".htm")) {
          editorCtr = WysiwygFactory.createWysiwygController(ureq, getWindowControl(), writableRootContainer, relFilePath, true);       
          ((HTMLEditorController)editorCtr).setNewFile(true);
        }
        else {
          editorCtr = new PlainTextEditorController(ureq, getWindowControl(), (VFSLeaf)writableRootContainer.resolve(relFilePath), "utf-8", true, true, null);
        }

        this.listenTo(editorCtr);
       
        mainPanel.setContent(editorCtr.getInitialComponent());
View Full Code Here

Examples of org.olat.core.commons.editor.plaintexteditor.PlainTextEditorController

    if (relFilePath.endsWith(".html") || relFilePath.endsWith(".htm")) {
      editorc = WysiwygFactory.createWysiwygController(ureq, getWindowControl(), writableRootContainer, relFilePath, true);
      ((HTMLEditorController)editorc).setNewFile(false);
    }
    else {
      editorc = new PlainTextEditorController(ureq, getWindowControl(), (VFSLeaf)currentItem, "utf-8", true, false, null);
    }
    listenTo(editorc);
    putInitialPanel(editorc.getInitialComponent());
    return this;
  }
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.