Implementing a Rich Text Editor in Android

Simple RichText Editor in Android

Found some quick solutions :

  • droid-writer
  • cwac-richedit

Also check following discussions:

  • Rich Text Box in android
  • Implementing a rich text editor in Android?

How did Evernote implement their rich text editor on Android?

here are some links that should help you get started:

http://code.google.com/p/android-richtexteditor/

Rich Text Box in android

Android Edittext Rich Text Formatting

Here are two awesome libraries which helped me out. Both of them are implementation of WYSIWYG.

Android RTEditor:
https://github.com/1gravity/Android-RTEditor

RichEditor-Android:
https://github.com/wasabeef/richeditor-android

Their implementation code is also provided.

How to store rich text data?

As from the documents they have following methods to get the contents and render

render(); //Render the editor. This method must be called to render the editor.
render(String html); //Render the editor with HTML as parameter.
render(EditorState state); //Render the editor with the state as a parameter

getContent(); //returns the content in the editor as EditorState
getContentAsSerialized(); //returns the content as serialized form of EditorState
getContentAsSerialized(EditorState state); //returns the provided parameter as serialized.
getContentAsHTML(); //returns the editor content in HTML format.

So you can use getContent() as per your requirement and directly store the content and use render method while displaying.

You can search how to store Serialised Objects inside Firebase to store EditorState object or directly store HTML text as String.

Create a simple text editor in Android

Look at this github project source code.

SUMMARY

Simple notepad app to open, edit and save text files to and from the SD card.

** Some features
-- open email attachments
-- change font size, type and color
-- delete/rename in file browser
-- email as text or attachment
-- Search using "search" button

Another Project Source Code . Android Ted

You can create new text file, open existing files and of course save them. You can also display line numbers and open recent files. Now you can also search for text inside the openned file.

Another Project Source Code - Qute Text Editor for Android



Related Topics



Leave a reply



Submit