Π·Π΅Ρ€ΠΊΠ°Π»ΠΎ ΠΈΠ·
1
0
Π€ΠΎΡ€ΠΊΠ½ΡƒΡ‚ΡŒ 0
πŸ“„ Text editor for plaintext files
ΠŸΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ ΠΊ Ρ„Π°ΠΉΠ»Ρƒ
Joas Schilling 77f94d5007 Merge pull request #153 from owncloud/issue-126-better-error-messages
Display the error message when one was given
2015-12-10 15:26:23 +01:00
appinfo Increase version number for 9.0, fixes #128 2015-11-25 12:55:58 +00:00
controller Display the error message when one was given 2015-12-10 09:18:56 +01:00
css overlay header as well for better focus 2015-11-11 15:47:06 +01:00
img adjust app icon to fit new filetype icons 2015-09-03 16:21:56 +02:00
js Display the error message when one was given 2015-12-10 09:18:56 +01:00
l10n [tx-robot] updated from transifex 2015-12-09 02:11:19 -05:00
tests Fix the whitelist stuff 2015-12-10 09:26:54 +01:00
.gitignore Fix the whitelist stuff 2015-12-10 09:26:54 +01:00
.scrutinizer.yml Ignore js/vendor/* aswell, not our code 2015-06-10 10:17:22 +02:00
.travis.yml Don't test master against old owncloud branches 2015-12-10 09:35:53 +01:00
CONTRIBUTING.md Add CONTRIBUTING.md 2015-07-08 22:14:03 +02:00
README.md Fix README title 2015-09-30 15:13:48 +02:00

README.md

Texteditor

Build Status Scrutinizer Code Quality Code Coverage

The original text editor app for ownCloud, 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 ownCloud 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.