Code Monkey home page Code Monkey logo

richeditorview's Introduction

RichEditorView

Android 基于WebView的富文本编辑器 - 仿简书编辑器

Functions

  • Bold
  • Italic
  • Strikethrough
  • Blockquote
  • Heading 1
  • Heading 2
  • Heading 3
  • Heading 4
  • Line
  • Undo
  • Redo
  • Insert Image
  • Insert Product(Custom layout)

特点:

  • 点击内容部分,键盘会将底部菜单栏弹起,点击标题则收起
  • 文字会自动定位在菜单栏的上方
  • 文字类型标识如加粗,删除线会根据光标位置自动改变

Setting for Editor

richEditor.edThishtml();                  // 获取标题和内容
richEditor.edUpcover(headerImageSrc);     // 添加封面图片
richEditor.edAddimgsrc(contentImageSrc);  // 添加内容图片
richEditor.edAddProduct(123, new Gson().toJson(goodsBean)); // 添加产品
richEditor.edOutdata(mTitle, mContent);  // 回显内容

Screenshots

Project Origin

为什么会有此开源项目?

公司准备在自己App内做编辑器模块,本来想用百度的开源编辑器,但是功能太复杂,参考了很多类似的编辑器都达不到项目需要的效果。结果发现了RichEditorWeb,基本功能都满足,就在此项目中做了修改,并运用到自己的项目中。感谢此项目的提供者。

在移植到项目中时,出现很多问题(如键盘上面的布局不弹起),为了解决这些问题并在其基础上扩展功能 花费了大量时间。在此特地将编辑器从项目中剥离出来,供后来的朋友参考借鉴。 如有帮助,还请Star一下,支持一下作者,非常感谢~

Question

  • 如果用户自己输入单个 英文单引号',或双引号",会回显不出来,因为html会识别为没有另一个结束符而报错。chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: missing ) after argument list", source: file:///android_asset/rich/editor.html (1)

Thanks

License

Copyright (C) 2016 Bin Jing

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

richeditorview's People

Contributors

youlookwhat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

richeditorview's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.