Code Monkey home page Code Monkey logo

canvas-editor-demo's Introduction

使用canvas实现富文本编辑器demo

支持编辑纯文本,支持设置字体、字号、颜色、背景颜色、删除线、下划线、行高。

支持输入、删除、回车

支持选区,选区支持删除和替换

实现原理可参考文章:如何用canvas实现一个富文本编辑器

canvas-editor-demo's People

Contributors

allen-1998 avatar wanglin2 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

Watchers

 avatar  avatar  avatar

canvas-editor-demo's Issues

这个可以同步两个方向一起实施:1、富文本编辑器;2、代码编辑器

1、富文本编辑器(不妨暂称为newword,读作牛蛙:-):

  • 目前商榷复制粘贴、鼠标事件、之类的。稍加充实完全可以先实现简易代码编辑器。

因为代码编辑器的一些功能同样word也是有需要的。比如:折叠功能、提示补全。顺带手地,未来的word中也有需要排版代码并美化之的需求,于是,第一时间就很方便地支持了。

  • newword最富有现实和未来意义的挑战是面向中文印刷排版的细节处理

代码编辑器

  • 所以,建议预先分类区别两方向上的公用模块和专有功能
  • 稍作瞻望:比如:仿word的批注功能,要不要考虑也用在代码编辑器上?大纲目录要不要?插入表格要不要也用在代码编辑器内?诸如此类的

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.