用于 HTML 所见即所得编辑器的 Eclipse 插件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5437583/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse plugin for HTML WYSIWYG editor
提问by ProgramME
I'm building a small web application in Eclipse. I made an HTML form and was unable to find an option to preview the page I built, and I have to run it on server to view it. In NetBeans, there is a built-in WYSIWYG html editor.
我正在 Eclipse 中构建一个小型 Web 应用程序。我制作了一个 HTML 表单,但找不到预览我构建的页面的选项,我必须在服务器上运行它才能查看它。在 NetBeans 中,有一个内置的 WYSIWYG html 编辑器。
Is there some HTML plugin for Eclipse?
是否有一些用于 Eclipse 的 HTML 插件?
(I don't need MyEclipse)
(我不需要 MyEclipse)
回答by Alex Abdugafarov
Since this is currently (2011-10-25) at 2nd place in Google for a "Eclipse HTML WYSIWYG" query and the question linked by Rafa de Castro dont give a complete answer, I feel that this question needs an update.
由于目前 (2011-10-25) 在 Google 中的“Eclipse HTML WYSIWYG”查询排名第二,并且 Rafa de Castro 链接的问题没有给出完整的答案,我觉得这个问题需要更新。
For now, the only available WYSIWYG tools for HTML I found are:
目前,我发现的唯一可用的 HTML 所见即所得工具是:
- WTP JavaServer Facescontains a tool named Web Page Editor. Nice, free and also serves as a visual editor.
- JBoss Tools HTML Editoris also free, neat, has two preview modes, but provides only simplest visual editing functionality.
- Eclipse Visual Designershipped with MyEclipse. It can even preview pages in IE/Firefox, but it has a huge disadvantage - it's a paid software. Looks awesome, but I didnt try it, so I can't say anything about quality.
- LeetEditis based on TinyMCE and provides enhanced visual editing functionality. It's free and you can fork it on github.
- WTP JavaServer Faces包含一个名为Web Page Editor的工具。不错,免费,还可以作为可视化编辑器。
- JBoss Tools HTML Editor也是免费的、简洁的,有两种预览模式,但只提供最简单的可视化编辑功能。
- Eclipse Visual Designer随MyEclipse一起提供。它甚至可以在 IE/Firefox 中预览页面,但它有一个巨大的缺点——它是一个付费软件。看起来很棒,但我没有尝试过,所以我不能说质量。
- LeetEdit基于 TinyMCE 并提供增强的可视化编辑功能。它是免费的,你可以在 github 上 fork。
A note about intsallation.
关于安装的说明。
Installing something into Eclipse is a pain for a new user.
将某些东西安装到 Eclipse 中对新用户来说是一种痛苦。
So, if you want to install just an HTML editor from WTP or JBoss without installing the whole thing with it, you can do the following (steps are vadid at least for Eclipse 3.6 and 3.7.):
因此,如果您只想从 WTP 或 JBoss 安装一个 HTML 编辑器,而不用它安装整个东西,您可以执行以下操作(至少对于 Eclipse 3.6 和 3.7 步骤是不同的。):
- Open Eclipse, select
Help / Install New Software
. - In the
Work with:
field input the update site address.
- 打开 Eclipse,选择
Help / Install New Software
. - 在
Work with:
字段中输入更新站点地址。
For JBoss Tools:
对于 JBoss 工具:
- Get the update site URL for the appropirate Eclipse version from here
- Select
JBoss Tool RichFaces
.
- 从此处获取相应 Eclipse 版本的更新站点 URL
- 选择
JBoss Tool RichFaces
。
For Web Pages Editor
对于网页编辑器
- Use an already existing update site, that look like
http://download.eclipse.org/releases/<eclipse_version_name>
- Select
Web Pages Editor
.
- 使用已经存在的更新站点,看起来像
http://download.eclipse.org/releases/<eclipse_version_name>
- 选择
Web Pages Editor
。
For LeetEdit
对于利特编辑
- Update-Site
http://timpietrusky.github.com/lab/leetedit/update-site
- Select
LeetEdit
- 更新站点
http://timpietrusky.github.com/lab/leetedit/update-site
- 选择
LeetEdit
Now press Next
and prepare to wait for eternity. (You can speed up this process by disabling Contact all update sites during install
checkbox)
现在按下Next
并准备等待永恒。(您可以通过禁用Contact all update sites during install
复选框来加快此过程)
回答by Stefan
To clarify the installation of the "Web Page Editor" which is actually called "JSF Tools - Web Page Editor" in the installation menu:
澄清“网页编辑器”的安装,在安装菜单中实际上称为“JSF工具-网页编辑器”:
Example for Eclipse Luna (try to use current eclipse version):
Eclipse Luna 示例(尝试使用当前的 Eclipse 版本):
Help => Install new Software => Enter update site http://download.eclipse.org/releases/luna
Go to category "Web, XML, Java EE and OSGi Enterprice Development"
Select "JSF Tools - Web Page Editor"
Also select "JSF Tools" (the icons of the palette wont work if you do not select this)
帮助 => 安装新软件 => 进入更新站点http://download.eclipse.org/releases/luna
转到类别“Web、XML、Java EE 和 OSGi 企业开发”
选择“JSF 工具 - 网页编辑器”
还要选择“JSF 工具”(如果不选择此选项板的图标将不起作用)
You can skip the step with the category if you enter "Web Page Editor" in the search box.
如果在搜索框中输入“网页编辑器”,则可以跳过该类别的步骤。
The Palette of the Eclipse Luna "JSF Tools -Web Page Editor" does not contain html5 elements.
Eclipse Luna “JSF 工具 - 网页编辑器”的调色板不包含 html5 元素。
回答by Miguel Angel
aptana studio 3 (eclipse plugin)
aptana studio 3(eclipse 插件)
回答by Growling Flea
I had the same question when trying to go through some introductory applet exercises that required me to write an HTML file to display the applet I created using Eclipse. I resolved the issue by using Notepad++ to edit the HTML document, then I stored my HTML file in the bin directory of my Eclipse project. There is probably a more correct solution, but I was able to get the result that I was looking for: displaying my java applet (created in Eclipse) using a web browser.
在尝试进行一些介绍性小程序练习时,我遇到了同样的问题,这些练习要求我编写一个 HTML 文件来显示我使用 Eclipse 创建的小程序。我通过使用 Notepad++ 编辑 HTML 文档解决了这个问题,然后我将我的 HTML 文件存储在我的 Eclipse 项目的 bin 目录中。可能有更正确的解决方案,但我能够得到我正在寻找的结果:使用 Web 浏览器显示我的 java 小程序(在 Eclipse 中创建)。
回答by Adrian
I successfully used richhtml4eclipseas the WYSIWYG editor for an internal software project - You get a dialog with native widgets for style buttons, etc, and a plain looking window for the HTML view.
我成功地将richhtml4eclipse用作内部软件项目的WYSIWYG编辑器 - 您将获得一个对话框,其中包含用于样式按钮等的本机小部件,以及一个用于HTML视图的普通窗口。
I also applied some post-processing to the output with the Java version of HTML Tidy, but that was more for version-control consistency reasons.
我还使用 Java 版本的 HTML Tidy 对输出应用了一些后处理,但这更多是出于版本控制一致性的原因。
This is a native JFace container with an embedded Browser widget running a page with tiny_mce embedded.
这是一个带有嵌入式浏览器小部件的原生 JFace 容器,运行一个嵌入了 tiny_mce 的页面。
It uses an older version of tiny_mce for it's internal HTML editor, and connects to it via an approach I've seen used elsewhere - passing events out to the native Java app via status bar changes, and accepting input via JavaScript calls on the Browser widget.
它使用旧版本的 tiny_mce 作为它的内部 HTML 编辑器,并通过我在其他地方看到的方法连接到它 - 通过状态栏更改将事件传递给本机 Java 应用程序,并通过浏览器小部件上的 JavaScript 调用接受输入.