Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AvinashSKaranth/android-summernote
Offline WYSIWYG HTML Editor for Android App
https://github.com/AvinashSKaranth/android-summernote
Last synced: about 1 month ago
JSON representation
Offline WYSIWYG HTML Editor for Android App
- Host: GitHub
- URL: https://github.com/AvinashSKaranth/android-summernote
- Owner: AvinashSKaranth
- Created: 2016-04-01T12:56:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-12-03T09:44:30.000Z (about 3 years ago)
- Last Synced: 2024-02-15T02:32:53.745Z (10 months ago)
- Language: Java
- Homepage: http://nashapp.in
- Size: 298 KB
- Stars: 108
- Watchers: 10
- Forks: 21
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-summernote - android-summernote
README
# android-summernote
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-android--summernote-green.svg?style=true)](https://android-arsenal.com/details/1/3392)To Add Offline WYSIWYG HTML Editor to your Android App
Add this to your dependencies
```groovy
compile 'in.nashapp.androidsummernote:androidsummernote:1.0.5'
```Add to Manifest (For adding images from Device)
```xml```
Add to your XML
```xml```
Link the view in your Java Code
```java
Summernote summernote = (Summernote) findViewById(R.id.summernote);
summernote.setRequestCodeforFilepicker(5);//Any Number which is not being used by other OnResultActivity
```Pass the on onActivityResult to Summernote. (Enables attaching images to the Document)
```java
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
summernote.onActivityResult(requestCode, resultCode, intent);
}
```Retrive HTML Data
```java
String html_data = summernote.getText()
```Set HTML Data
```java
summernote.setText("Hello World.
I'am Summernote
");
```Known Issues
* Calling from Fragment
Current Resolution
Using summernote as a static variable in the Fragment and calling onActivityResult from the Main Activity
```java
// In Fragment
static Summernote summernote;// In Activity
Fragment.summernote.onActivityResult(requestCode, resultCode, intent);
```
**License**
Apache License 2.0