Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Code of Conduct

This project follows the ownCloud Code of Conduct.

Please read the full Code of Conduct at:
**<https://owncloud.com/contribute/code-of-conduct/>**

By participating in this project, you agree to abide by its terms.
29 changes: 6 additions & 23 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
## Submitting issues
# Contributing

If you have questions about how to install or use ownCloud, please direct these to the [mailing list][mailinglist] or our [forum][forum]. We are also available on [IRC][irc].
Thank you for your interest in contributing to this project!

### Short version
Please read the full contributing guidelines at:
**<https://owncloud.com/contribute/>**

* The [**issue template can be found here**][template]. Please always use the issue template when reporting issues.

### Guidelines
* Please search the existing issues first, it's likely that your issue was already reported or even fixed.
- Go to one of the repositories, click "issues" and type any word in the top search/command bar.
- You can also filter by appending e. g. "state:open" to the search string.
- More info on [search syntax within github](https://help.github.com/articles/searching-issues)
* This repository ([files_texteditor](https://github.com/owncloud/files_texteditor/issues)) is *only* for issues within the ownCloud files_texteditor code.
* __SECURITY__: Report any potential security bug to security@owncloud.com following our [security policy](https://owncloud.org/security/) instead of filing an issue in our bug tracker
* Report the issue using our [template][template], it includes all the information we need to track down the issue.

Help us to maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues.

[template]: https://raw.github.com/owncloud/core/master/issue_template.md
[mailinglist]: https://mailman.owncloud.org/mailman/listinfo/owncloud
[forum]: https://forum.owncloud.org/
[irc]: https://webchat.freenode.net/?channels=owncloud&uio=d4

### Contribute Code and translations
Please check [core's contribution guidelines](https://github.com/owncloud/core/blob/master/CONTRIBUTING.md) for further information about contributing code and translations.
For development setup, coding standards, and pull request process,
see the README in this repository.
130 changes: 86 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,103 @@
# Texteditor
# ownCloud Text Editor

[![Build Status](https://drone.owncloud.com/api/badges/owncloud/files_texteditor/status.svg?branch=master)](https://drone.owncloud.com/owncloud/files_texteditor)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=owncloud_files_texteditor&metric=alert_status)](https://sonarcloud.io/dashboard?id=owncloud_files_texteditor)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=owncloud_files_texteditor&metric=security_rating)](https://sonarcloud.io/dashboard?id=owncloud_files_texteditor)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=owncloud_files_texteditor&metric=coverage)](https://sonarcloud.io/dashboard?id=owncloud_files_texteditor)
<!-- OSPO-managed README | Generated: 2026-04-16 | v2 -->

[![License](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](LICENSE) [![ownCloud OSPO](https://img.shields.io/badge/OSPO-ownCloud-blue)](https://kiteworks.com/opensource) [![Docker Hub](https://img.shields.io/docker/pulls/owncloud)](https://hub.docker.com/r/owncloud/server)

The original text editor app for ownCloud, based on [Ace](http://ace.c9.io/).
The original text editor app for ownCloud Classic (OC10), built on the [Ace](http://ace.c9.io/) code editor. It provides syntax highlighting, syntax checking, autosave, and a responsive design optimized for both desktop and mobile. Users can edit supported text file types directly in the browser by clicking on them in the Files app.

Features:
- Syntax highlighting
- Autosave
- Syntax checking
- Responsive design (optimised on mobile and desktop)
## Getting Started

## Install
Simply copy the `files_texteditor` folder into the `apps` directory and enable the app within the ownCloud settings.
Copy the `files_texteditor` folder into the ownCloud `apps` directory and enable it:

## Usage
To use the editor, click on a [supported file](https://github.com/owncloud/files_texteditor/blob/master/js/editor.js#L6) 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`.
```bash
sudo -u www-data php occ app:enable files_texteditor
```

## Contributors
Maintainer: [Tom Needham](http://github.com/tomneedham)
Past contributors: [Thomas Müller](http://github.com/deepdiver1975) [Robin Appelman](http://github.com/icewind) [Jörn Friedrich Dreyer](http://github.com/butonic) [Vincent Petry](http://github.com/pvince)
Click on any supported text file in the Files app to open it in the editor. Saving is automatic, or use `Ctrl+S` / `Cmd+S`.

## Documentation

Preview apps
------------
- [ownCloud Server Admin Manual](https://doc.owncloud.com/server/latest/admin_manual/)

Apps can add side-by-side previews to the app for certain file types by using the preview api
## Part of ownCloud Classic (OC10)

```js
This app extends [ownCloud Server](https://github.com/owncloud/core) with in-browser text editing capabilities. It is shipped as part of the [ownCloud Server Docker image](https://hub.docker.com/r/owncloud/server).

OCA.MYApp.Preview = function(){
...
}
## Community & Support

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) {
...
}
}
**[Star](https://github.com/owncloud/files_texteditor)** this repo and **Watch** for release notifications!

OCA.Files_Texteditor.registerPreviewPlugin('text/markdown', new OCA.MYApp.Preview());
- [ownCloud Website](https://owncloud.com)
- [Community Discussions](https://github.com/orgs/owncloud/discussions)
- [Matrix Chat](https://app.element.io/#/room/#owncloud:matrix.org)
- [Documentation](https://doc.owncloud.com)
- [Enterprise Support](https://owncloud.com/contact-us/)
- [OSPO Home](https://kiteworks.com/opensource)

```
## Contributing

We welcome contributions! Please read the [Contributing Guidelines](CONTRIBUTING.md)
and our [Code of Conduct](CODE_OF_CONDUCT.md) before getting started.

### Workflow

- **Rebase Early, Rebase Often!** We use a rebase workflow. Always rebase on the target branch before submitting a PR.
- **Dependabot**: Automated dependency updates are managed via Dependabot. Review and merge dependency PRs promptly.
- **Signed Commits**: All commits **must** be PGP/GPG signed. See [GitHub's signing guide](https://docs.github.com/en/authentication/managing-commit-signature-verification).
- **DCO Sign-off**: Every commit must carry a `Signed-off-by` line:
```
git commit -s -S -m "your commit message"
```
- **GitHub Actions Policy**: Workflows may only use actions that are (a) owned by `owncloud`, (b) created by GitHub (`actions/*`), or (c) verified in the GitHub Marketplace.

## Translations

Help translate this project on Transifex:
**<https://explore.transifex.com/owncloud-org/owncloud/>**

Please submit translations via Transifex -- do not open pull requests for translation changes.

## Security

**Do not open a public GitHub issue for security vulnerabilities.**

Report vulnerabilities at **<https://security.owncloud.com>** -- see [SECURITY.md](SECURITY.md).

Bug bounty: [YesWeHack ownCloud Program](https://yeswehack.com/programs/owncloud-bug-bounty-program)

## License

This project is licensed under the [AGPL-3.0](LICENSE).

## About the ownCloud OSPO

The [Kiteworks Open Source Program Office](https://kiteworks.com/opensource), operating under
the [ownCloud](https://owncloud.com) brand, launched on May 5, 2026, to steward the open source
ecosystem around ownCloud's products. The OSPO ensures transparent governance, license compliance,
community health, and sustainable collaboration between the open source community and
[Kiteworks](https://www.kiteworks.com), which acquired ownCloud in 2023.

- **OSPO Home**: <https://kiteworks.com/opensource>
- **GitHub**: <https://github.com/owncloud>
- **ownCloud**: <https://owncloud.com>

For questions about the OSPO or licensing, contact ospo@kiteworks.com.

### License Migration to Apache 2.0

The OSPO is driving a strategic relicensing of ownCloud repositories toward the
[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), following
the [Apache Software Foundation's third-party license policy](https://www.apache.org/legal/resolved.html).

Individual repositories will migrate as their audit is completed. The LICENSE file
in each repo reflects its **current** license status (not the target).

**Current license: AGPL-3.0** (Category X per Apache policy -- cannot be included in Apache-2.0 works).

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 edited with any slash replaced by dashes.
Migration prerequisites for this repository:

e.g. when editing a markdown file the preview element can be styled using the `#preview.text-markdown` css query.
- **CLA/DCO coverage**: All past contributors must have signed agreements permitting relicensing
- **Copyleft dependency audit**: All AGPL/GPL dependencies must be replaced or isolated
- **KDE heritage review**: Any code with KDE-era copyrights requires legal analysis
- **Complete relicensing**: AGPL-3.0 is a strong copyleft license; migration requires full relicensing of all files, not just a header change
11 changes: 11 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Security Policy

## Reporting a Vulnerability

**Do NOT open a public GitHub issue for security vulnerabilities.**

Please report security issues responsibly via:
**<https://security.owncloud.com>**

You can also report vulnerabilities through our YesWeHack bug bounty program:
**<https://yeswehack.com/programs/owncloud-bug-bounty-program>**
10 changes: 10 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Support

For support with this project, please use the following channels:

- **Enterprise Support**: <https://owncloud.com/contact-us/>
- **Community discussions**: https://github.com/orgs/owncloud/discussions
- **Matrix Chat**: <https://app.element.io/#/room/#owncloud:matrix.org>
- **Documentation**: <https://doc.owncloud.com>

Please do not use GitHub issues for general support questions.
69 changes: 69 additions & 0 deletions agents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# AI Agent Guidelines for ownCloud Text Editor

This file provides context for AI coding agents (Claude Code, GitHub Copilot, Cursor, etc.) working in this repository.

## Repository Overview
- **Product family:** Classic (OC10)
- **Primary language(s):** JavaScript
- **Build system:** Make + Composer
- **Test framework:** PHPUnit
- **CI system:** GitHub Actions

## Architecture & Key Paths

- `appinfo/` -- App metadata and registration
- `controller/` -- PHP controllers
- `js/` -- Frontend JavaScript (Ace editor integration)
- `css/` -- Stylesheets
- `l10n/` -- Translations
- `tests/` -- PHPUnit tests
- `CONTRIBUTING.md` -- Contribution guidelines
- `Makefile` -- Build and test targets

## Development Conventions
- **Branching:** master
- **Commit messages:** DCO sign-off required (`git commit -s`)
- **Code style:** PHP-CS-Fixer and PHP_CodeSniffer (`phpcs.xml`, `vendor-bin/owncloud-codestyle`)
- **PR process:** Open a PR against `master`. All CI checks must pass.

## Build & Test Commands
```bash
# Build
make dist

# Test
make test-php-unit

# Lint
make test-php-style
```

## Important Constraints
- All code contributions must be compatible with the **AGPL-3.0** license
- Do not introduce new **copyleft-licensed dependencies** (GPL, AGPL, LGPL, MPL) without explicit discussion in an issue first. This is especially important for repos migrating to Apache 2.0.
- Do not introduce new dependencies without discussion in an issue first


## OSPO Policy Constraints

### GitHub Actions
- **Only** use actions owned by `owncloud`, created by GitHub (`actions/*`), verified on the GitHub Marketplace, or verified by the ownCloud Maintainers.
- Pin all actions to their full commit SHA (not tags): `uses: actions/checkout@<SHA> # vX.Y.Z`
- Never introduce actions from unverified third parties.

### Dependency Management
- Dependabot is configured for automated dependency updates.
- Review and merge Dependabot PRs as part of regular maintenance.
- Do not introduce new dependencies without discussion in an issue first.

### Git Workflow
- **Rebase policy**: Always rebase; never create merge commits. Use `git pull --rebase` and `git rebase` before pushing.
- **Signed commits**: All commits **must** be PGP/GPG signed (`git commit -S -s`).
- **DCO sign-off**: Every commit needs a `Signed-off-by` line (`git commit -s`).
- **Conventional Commits & Squash Merge**: Use the [Conventional Commits](https://www.conventionalcommits.org/) format where the repository enforces it. Many repos use squash merge, where the PR title becomes the commit message on the default branch — apply Conventional Commits format to PR titles as well. A reusable GitHub Actions workflow enforces this.

## Context for AI Agents
- Match existing code style
- Do not refactor unrelated code in the same PR
- Write tests for new functionality
- Keep PRs focused and atomic
Loading