android 短信编辑器,richeditor-android富文本编辑器

拓拔富
2023-12-01

Gradlerepositories {

jcenter()

}

dependencies {

compile 'jp.wasabeef:richeditor-android:[email protected]'

}

粗体RichEditor editor = (RichEditor) findViewById(R.id.editor);

editor.setBold();

斜体RichEditor editor = (RichEditor) findViewById(R.id.editor);

editor.setItalic();

插入图片RichEditor editor = (RichEditor) findViewById(R.id.editor);

editor.insertImage("https://raw.githubusercontent.com/wasabeef/art/master/twitter.png","twitter");

监听文字改变RichEditor editor = (RichEditor) findViewById(R.id.editor);

editor. setOnTextChangeListener(new RichEditor.OnTextChangeListener() {

@Override

public void onTextChange(String text) {

// Do omething

Log.d("RichEditor", "Preview " + text);

}

});

 类似资料: