GithubHelp home page GithubHelp logo

chengjingfeng / files_texteditor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nextcloud/files_texteditor

0.0 3.0 0.0 9.73 MB

:page_facing_up: Text editor for plaintext files

Makefile 0.19% PHP 11.68% CSS 3.56% JavaScript 84.57%

files_texteditor's Introduction

Texteditor

Build Status Scrutinizer Code Quality Code Coverage

The original text editor app for Nextcloud, based on Ace.

Features:

  • Syntax highlighting
  • Autosave
  • Syntax checking
  • Responsive design (optimised on mobile and desktop)

Install

Simply copy the files_texteditor folder into the apps directory and enable the app within the Nextcloud settings.

Usage

To use the editer, click on a supported file within the Files app and the file will be loaded into the editor. Saving is automatic, but can also be triggered manually with Ctrl+S or Cmd+S.

Contributors

Maintainer: Robin Appelman Past contributors: Thomas Müller Tom Needham Jörn Friedrich Dreyer Vincent Petry

Preview apps

Apps can add side-by-side previews to the app for certain file types by using the preview api

OCA.MYApp.Preview = function(){
    ...
}

OCA.MYApp.Preview.Prototype = {
    /**
     * Give the app the opportunity to load any resources it needs and prepare for rendering a preview
     */
    init: function() {
        ...
    },
    /**
     * @param {string} the text to create the preview for
     * @param {jQuery} the jQuery element to render the preview in
     */
    preview: function(text, previewElement) {
        ...
    }
}

OCA.Files_Texteditor.registerPreviewPlugin('text/markdown', new OCA.MYApp.Preview());

For styling of the preview, the preview element will have the id preview and the className will be set to the mimetype of the file being eddited with any slash replaced by dashes.

e.g. when editing a markdown file the preview element can be styled using the #preview.text-markdown css query.

files_texteditor's People

Contributors

bartv2 avatar bbamsch avatar bernhardposselt avatar butonic avatar danxuliu avatar deepdiver1975 avatar dependabot-support avatar emerzh avatar fmkaiser avatar georgehrke avatar henni avatar icewind1991 avatar j-ed avatar jancborchardt avatar juliushaertl avatar libasys avatar lukasreschke avatar mikeazo avatar mormuig avatar morrisjobke avatar mtgap avatar nextcloud-bot avatar nickvergessen avatar pvince81 avatar rullzer avatar schiessle avatar skjnldsv avatar sysdef avatar tomneedham avatar vgezer avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.