Π·Π΅Ρ€ΠΊΠ°Π»ΠΎ ΠΈΠ·
1
0
Π€ΠΎΡ€ΠΊΠ½ΡƒΡ‚ΡŒ 0
πŸ“„ Text editor for plaintext files
ΠŸΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ ΠΊ Ρ„Π°ΠΉΠ»Ρƒ
Jenkins for ownCloud 2083c9083e [tx-robot] updated from transifex 2015-09-04 02:11:17 -04:00
appinfo Update version no. and file header 2015-09-01 13:51:38 +02:00
controller Merge pull request #96 from owncloud/master-fix-path-disclosure 2015-09-01 14:18:56 +02:00
css change line highlight colour to grey 2015-09-01 13:41:42 +02:00
img adjust app icon to fit new filetype icons 2015-09-03 16:21:56 +02:00
js fix history in ie8 2015-09-01 15:27:56 +02:00
l10n [tx-robot] updated from transifex 2015-09-04 02:11:17 -04:00
tests Merge pull request #96 from owncloud/master-fix-path-disclosure 2015-09-01 14:18:56 +02:00
.gitignore Merge in master 2015-08-27 21:19:42 +02:00
.scrutinizer.yml Ignore js/vendor/* aswell, not our code 2015-06-10 10:17:22 +02:00
.travis.yml PHP 7 should always pass 2015-07-18 22:29:17 +02:00
CONTRIBUTING.md Add CONTRIBUTING.md 2015-07-08 22:14:03 +02:00
README.md Add preview api to readme 2015-09-01 13:16:04 +02:00

README.md

files_texteditor

A text editor app for ownCloud

To see which files are editable, see here

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.