https://github.com/hansemannn/titanium-rich-text-editor
Use the native Aztec rich text editor (iOS & Android) in Titanium!
https://github.com/hansemannn/titanium-rich-text-editor
android ios java module swift tidev titanium
Last synced: 6 months ago
JSON representation
Use the native Aztec rich text editor (iOS & Android) in Titanium!
- Host: GitHub
- URL: https://github.com/hansemannn/titanium-rich-text-editor
- Owner: hansemannn
- License: mit
- Created: 2019-10-06T10:50:02.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2025-08-08T14:44:10.000Z (11 months ago)
- Last Synced: 2025-08-08T16:31:08.057Z (11 months ago)
- Topics: android, ios, java, module, swift, tidev, titanium
- Language: Objective-C
- Homepage:
- Size: 81.1 MB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Titanium Rich Text Editor
Use the native `Aztec` rich text editor ([iOS](https://github.com/wordpress-mobile/AztecEditor-ios) & [Android](https://github.com/wordpress-mobile/AztecEditor-Android)) in Titanium!
## Requirements
- [x] Android: Titanium SDK 9.0.0+
- [x] iOS: Titanium SDK 9.2.0+
## Example
```js
import TiEditor from 'ti.editor';
const window = Ti.UI.createWindow({ title: 'Add blog post' });
const nav = Ti.UI.createNavigationWindow({ window });
// Alloy:
const editorView = TiEditor.createEditorView({ top: 20, left: 20, right: 20 });
// Editable
editorView.editable = true | false;
// Text Color
editorView.color = "#CCC";
// Editor ContentInsets
// iOS:
editorView.contentInset = { left: 8, right: 8, top: 10, bottom: 10 };
// Android:
editorView.padding = { left: 8, right: 8, top: 10, bottom: 10 };
// Scroll Indicator Insets
editorView.scrollIndicatorInsets = { top: 10, bottom: 10 };
// Hint Text (Android-Only):
editorView.hintText = "Enter text here...";
editorView.focus(); // Focus the Editor
editorView.blur(); // Blur the Editor
// populate content html
editorView.content = "
Hello World";
// Get content html:
editorView.content;
// Check if content changed: Android-Only
editorView.isChanged;
// BackgroundColor: iOS-Only
editorView.editorBackgroundColor = "#CCC";
editorView.addEventListener('change', ({ value }) => {
console.warn('Content changed: ', value);
});
// Show/Hide Editor Toolbar (Android-Only):
editorView.editorToolbarVisible = true | false;
editorView.addEventListener('link', ({ url }) => {
Ti.Platform.openURL(url);
});
window.add(editorView);
window.addEventListener('focus', () => editorView.focus());
nav.open();
```
## Author
Hans Knöchel
## License
MIT