Skip to content

The best rich text editor for android platform, which includes more completely features. 安卓富文本编辑器

License

Notifications You must be signed in to change notification settings

Honsec/icarus-android

Repository files navigation

icarus-android

Maybe the best rich text editor on android platform. Base on Simditor

demo

Features

  • Alignment (left/center/right)
  • Bold
  • Blockquote
  • Code
  • Horizontal rule
  • Italic
  • Image
  • Indent
  • Link
  • Outdent
  • Ordered List
  • Unordered List
  • Underline
  • Raw html (Insert anything to any selection range that you want via API)

Usage

Add this line to your build.gradle file under your module directory.

compile 'com.github.mr5:icarus:0.1.6-SNAPSHOT'

Java codes:

import android.app.Activity;
import android.webkit.WebView;
import android.widget.TextView;

import com.github.mr5.icarus.entity.Options;
import com.github.mr5.icarus.button.TextViewButton;
class EditorActivity extends Activity {
	protected WebView webView;
    protected Icarus icarus;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Get WebView from your layout, or create it manually.
        setContentView(R.layout.activity_main);
        webView = (WebView) findViewById(R.id.editor);
        // I offered a toolbar to manage editor buttons which implements TextView that with icon fonts. 
        // It's just a collection, not a Android View implementation. 
        // TextViewToolbar will listen click events on all buttons that added to it. 
        // You can implement your own `Toolbar`, to prevent these default behaviors.
        TextViewToolbar toolbar = new TextViewToolbar();
        Options options = new Options();
        options.setPlaceholder("Placeholder...");
        icarus = new Icarus(toolbar, options, webView);
        TextView boldButton = new TextViewButton()
        boldButton.setName("bold");
		toolbar.addButton(boldButton);
        icarus.render();
    }
 }

Sample

About

The best rich text editor for android platform, which includes more completely features. 安卓富文本编辑器

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 75.1%
  • Java 13.8%
  • CSS 10.6%
  • HTML 0.5%