编写简单的自定义编辑器需要多长时间? [英] How fast does it take to write a simple, custom editor?

查看:118
本文介绍了编写简单的自定义编辑器需要多长时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简而言之,我有按钮:


  1. 粗体,

  2. 斜体,

  3. 编号列表

  4. 项目符号列表

  5. 向左缩进

  6. 缩进正确

  7. 拼写检查(显然受现成的js组件支持)

:具有自定义图标-实际上只是自定义设计



没有从头开始编写的框架,重量轻,与主要浏览器兼容



这是Web应用程序的主要组件之一,因此它必须是超轻量级的,这就是为什么我不想要框架

解决方案

编写跨平台的编辑器可能很困难,但是,由于它是一个大型项目,因此您应该在创建过程中创建自己的框架。



如果您只想要自定义图标,那将取决于您制作它们所需的时间,但是,要获得一些基本功能并不是那么困难,大概不到40小时的工作时间k,如果您知道自己在做什么。



在Unix中,编写您自己的shell曾经是一种习惯,在javascript中,它可能是在编写您自己的编辑器。 :)



麻烦的地方是我是否有

 < ; b>一些文本< / b< i>更多文本< / i" 

,我决定从此文本中删除标签,然后如何解决它会变得棘手。 / p>

如果您只想使用css,那么当您将span标签中的文本分组并修复css类时,问题就更加棘手了,而用户仍在继续做出改变。



我目前正在处理这个问题,因为我想要一个可以在XHTML2.0中工作的编辑器,这不是一个小问题,比在一个HTML语言中做起来要困难得多。



我建议先使其在Firefox 3和Safari上运行,然后,一旦运行,请返回并添加代码以将其添加到可以在IE8上运行,如果需要IE7,则由于MS现在将IE8作为重要更新发布。


by simple I mean, having buttons:

  1. bold,
  2. italic,
  3. numbered list
  4. bullet point list
  5. indent left
  6. indent right
  7. spell check (obviously supported by ready made js component)

by custom I mean: having custom icons - so really just custom design

no frameworks, written from scratch, lightweight, compatible with major browsers

this is one of the main components of the webapp, so it has to be super lightweight, that's why I don't want frameworks

解决方案

Writing an editor that works cross-platform can be difficult, but, you should create your own framework as you do it, as it is a large project.

If you just want custom icons, that will depend on how long it takes you to make them, but, to get some basic functionality isn't that hard, probably less than 40 hrs of work if you know what you are doing.

In Unix writing your own shell used to be a rite of passage, in javascript it may be writing your own editor. :)

Where it gets tricky is if I have

<b>some text</b><i>more text</i>

and I decide to remove the tags from this text, then how to fix it will get tricky.

If you want to use only css then it gets to be more of a problem as you are grouping text from span tags, and fixing css classes, while the user is continuing to make changes.

I am dealing with this currently as I want an editor that works in XHTML2.0, and it is not a trivial issue, much harder than it is to do in a desktop application.

I would suggest getting it to work on Firefox 3 and Safari first, then, once it is working, go back and add in the code to get it to work on IE8, and if you want IE7, since MS is pushing IE8 out as a critical update now.

这篇关于编写简单的自定义编辑器需要多长时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆