Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何存储富文本数据?_Android_Firebase_Google Cloud Firestore_Rich Text Editor - Fatal编程技术网

Android 如何存储富文本数据?

Android 如何存储富文本数据?,android,firebase,google-cloud-firestore,rich-text-editor,Android,Firebase,Google Cloud Firestore,Rich Text Editor,我正在开发一个博客应用程序。目前,在发布博客条目时,您可以上载纯文本,并且每篇文章最多只能上载一张图像 我想添加一个富文本(WYSIWYG)编辑器。如何将富文本格式(样式、字体、颜色等)保存到firebase数据库并从中检索 另外,我如何添加存储任意数量图像的能力?对于文档,他们有以下方法来获取内容和渲染 render(); //Render the editor. This method must be called to render the editor. render(String ht

我正在开发一个博客应用程序。目前,在发布博客条目时,您可以上载纯文本,并且每篇文章最多只能上载一张图像

我想添加一个富文本(WYSIWYG)编辑器。如何将富文本格式(样式、字体、颜色等)保存到firebase数据库并从中检索


另外,我如何添加存储任意数量图像的能力?

对于文档,他们有以下方法来获取内容和渲染

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.
因此,您可以根据需要使用
getContent()
,直接存储内容,并在显示时使用render方法


您可以搜索如何在Firebase中存储序列化对象,以存储
EditorState
对象,或直接将HTML文本存储为
String

编辑器生成的格式?