Π·Π΅Ρ€ΠΊΠ°Π»ΠΎ ΠΈΠ·
1
0
Π€ΠΎΡ€ΠΊΠ½ΡƒΡ‚ΡŒ 0
πŸ“„ Text editor for plaintext files
ΠŸΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ ΠΊ Ρ„Π°ΠΉΠ»Ρƒ
Thomas MΓΌller 8fed9fe223 Merge pull request #115 from owncloud/updaterowaftersave
Update file list row after save
2015-09-30 15:08:38 +02:00
appinfo Only load scripts when needed 2015-09-23 10:35:51 +02:00
controller Merge pull request #96 from owncloud/master-fix-path-disclosure 2015-09-01 14:18:56 +02:00
css Properly namespace CSS to not break core styles 2015-09-23 10:33:37 +02:00
img adjust app icon to fit new filetype icons 2015-09-03 16:21:56 +02:00
js Merge pull request #115 from owncloud/updaterowaftersave 2015-09-30 15:08:38 +02:00
l10n [tx-robot] updated from transifex 2015-09-28 02:39:11 -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.