HTML页面中的VML / SVG编辑器

时间:2022-11-20 17:36:44

I have integrated various WYSIWYG HTML editors over the past few years, but I think I have hit a brick wall on this one.

在过去的几年里,我已经集成了各种所见即所得的HTML编辑器,但我认为我已经在这个问题上遇到了障碍。

We need a way for people to edit text that turns into VML/SVG when rendered, but remains editable, with minimal styling such as bold, italic, font face and size, and if possible, ability to create a text region anywhere on the canvas. Google Docs has what appears to be one in their presentation editor. Something like that would work ~ its very close to what we are looking for.

我们需要一种方法让人们编辑在渲染时变成VML / SVG的文本,但仍然可以编辑,只需要最小的样式,如粗体,斜体,字体和大小,如果可能的话,还可以在画布上的任何位置创建文本区域。 Google文档似乎是其演示文稿编辑器中的一个。这样的东西会起作用〜它非常接近我们正在寻找的东西。

Does anyone know of a commercial or free editor that does this (must be browser based), and if not, has anyone approached doing this, and if so, what were your results. Any other info, links, suggestions etc are welcome - I seem to have hit a brick wall on this one.

有没有人知道这样做的商业或免费编辑器(必须是基于浏览器的),如果没有,有人接近这样做,如果是这样,你的结果是什么。任何其他信息,链接,建议等都是受欢迎的 - 我似乎在这个问题上遇到了障碍。

Thanks.

2 个解决方案

#1


You might try http://svg-edit.googlecode.com/ though we do not translate to VML (we require IE users to install the Google Chrome Frame plugin).

您可以尝试http://svg-edit.googlecode.com/虽然我们没有翻译成VML(我们要求IE用户安装Google Chrome Frame插件)。

#2


One important question first: Why specifically should the output of the WYSIWYG editor be in VML/SVG?

首先要考虑一个重要问题:为什么WYSIWYG编辑器的输出应该是VML / SVG?

===

I am not aware of any existing editor that fits your description. You may have to write one yourself. If you are going to roll your own, I have two suggestions; one of which I am less confident about in terms of capability and one where I am not entirely sure about the performance ramifications because of the sheer amount of libraries involved. Either way, these are the two best bets in my opinion:

我不知道任何适合您描述的编辑器。你可能要自己写一个。如果你打算自己动手,我有两个建议;其中一个我在能力方面不太自信,而且由于涉及大量的图书馆,我不能完全确定性能后果。无论哪种方式,这些都是我认为最好的两个赌注:

1) If you're intent upon VML/SVG, one library I know that can bring the two together is RaphaelJS, which has some degree of text support, but I'm really not sure how sophisticated the degree of manipulation of the text is:

1)如果您打算使用VML / SVG,我知道可以将两者结合在一起的一个库是RaphaelJS,它有一定程度的文本支持,但我真的不确定文本的操作程度是多么复杂:

2) Can you instead use VML/Canvas? I would recommend using VML/Canvas via the exCanvas library (which allows you to write code using the HTML5 canvas element, which is automagically translated to VML in IE/Trident browsers), in addition to the new canvas-text library.

2)你可以改用VML / Canvas吗?我建议通过exCanvas库使用VML / Canvas(它允许您使用HTML5 canvas元素编写代码,除了新的canvas-text库之外,它还可以自动转换为IE / Trident浏览器中的VML)。

#1


You might try http://svg-edit.googlecode.com/ though we do not translate to VML (we require IE users to install the Google Chrome Frame plugin).

您可以尝试http://svg-edit.googlecode.com/虽然我们没有翻译成VML(我们要求IE用户安装Google Chrome Frame插件)。

#2


One important question first: Why specifically should the output of the WYSIWYG editor be in VML/SVG?

首先要考虑一个重要问题:为什么WYSIWYG编辑器的输出应该是VML / SVG?

===

I am not aware of any existing editor that fits your description. You may have to write one yourself. If you are going to roll your own, I have two suggestions; one of which I am less confident about in terms of capability and one where I am not entirely sure about the performance ramifications because of the sheer amount of libraries involved. Either way, these are the two best bets in my opinion:

我不知道任何适合您描述的编辑器。你可能要自己写一个。如果你打算自己动手,我有两个建议;其中一个我在能力方面不太自信,而且由于涉及大量的图书馆,我不能完全确定性能后果。无论哪种方式,这些都是我认为最好的两个赌注:

1) If you're intent upon VML/SVG, one library I know that can bring the two together is RaphaelJS, which has some degree of text support, but I'm really not sure how sophisticated the degree of manipulation of the text is:

1)如果您打算使用VML / SVG,我知道可以将两者结合在一起的一个库是RaphaelJS,它有一定程度的文本支持,但我真的不确定文本的操作程度是多么复杂:

2) Can you instead use VML/Canvas? I would recommend using VML/Canvas via the exCanvas library (which allows you to write code using the HTML5 canvas element, which is automagically translated to VML in IE/Trident browsers), in addition to the new canvas-text library.

2)你可以改用VML / Canvas吗?我建议通过exCanvas库使用VML / Canvas(它允许您使用HTML5 canvas元素编写代码,除了新的canvas-text库之外,它还可以自动转换为IE / Trident浏览器中的VML)。