Π·Π΅Ρ€ΠΊΠ°Π»ΠΎ ΠΈΠ·
1
0
Π€ΠΎΡ€ΠΊΠ½ΡƒΡ‚ΡŒ 0
πŸ“„ Text editor for plaintext files
ΠŸΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ ΠΊ Ρ„Π°ΠΉΠ»Ρƒ
Robin Appelman 22cd7c18d7
split the code a bit more
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-01-18 11:48:55 +01:00
.github Add the issue template 2017-04-05 10:00:26 +02:00
.tx Fix tx config 2018-02-12 23:00:10 +01:00
appinfo switch to webpack bundling 2019-01-18 11:46:50 +01:00
css Increase padding of code block 2018-10-16 14:36:29 +02:00
img add missing images 2017-02-22 21:25:36 +01:00
js split the code a bit more 2019-01-18 11:48:55 +01:00
l10n [tx-robot] updated from transifex 2019-01-18 01:26:18 +00:00
lib/Controller Show 'could not write to file'-message is writing file failed 2018-06-09 22:23:49 +02:00
tests Fix unit tests 2018-08-15 20:03:44 +02:00
.babelrc switch to webpack bundling 2019-01-18 11:46:50 +01:00
.drone.yml Update master php testing versions 2019-01-07 16:01:51 +01:00
.gitignore bumb ace editor to 1.2.5 2016-11-30 18:07:20 +01:00
.scrutinizer.yml Ignore js/vendor/* aswell, not our code 2015-06-10 10:17:22 +02:00
.travis.yml Update master php testing versions 2019-01-07 16:01:51 +01:00
Makefile switch to webpack bundling 2019-01-18 11:46:50 +01:00
README.md Add branding 2016-07-21 01:09:52 +02:00
package-lock.json switch to webpack bundling 2019-01-18 11:46:50 +01:00
package.json switch to webpack bundling 2019-01-18 11:46:50 +01:00
webpack.config.js split the code a bit more 2019-01-18 11:48:55 +01:00

README.md

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: Tom Needham Past contributors: Thomas MΓΌller Robin Appelman 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.