我可以使用什么软件/网络应用程序来编辑 HTML 页面?

发布于 2024-10-03 01:45:40 字数 1056 浏览 1 评论 0原文

好吧,我的问题并不像看起来那么广泛,总结一下我 8 个月

的努力:我创建了可重用、可扩展的 XHTML 块,它可以优雅地降级,而且非常棒。我的大部分代码块都提供了 Javascript 交互层,并使用 CSS 进行样式设置。我开始将我的代码块作为“片段”拉入 Dreamweaver,但它们是不智能的文本块。而且,一旦插入,我漂亮的代码块就会被实际使用 Dreamweaver 的非技术人员破坏。

另外,因为它们是不智能的片段,所以我有一行 Javascript,它在初始化时配置代码块 - 请参阅这篇文章以获取有关我的方法的更多详细信息。但目前我必须复制单个代码块的次数与配置选项的数量一样多(因此每个“片段”与相同类型的另一个代码块可能仅存在一个配置值不同)。这是令人难以置信的蹩脚,它确实有效,但对我来说重新部署一堆片段是蹩脚且耗时的,而且我的团队很难记住所有的变化。

因此,在我看来,我有一系列要求,作为我将块放入的任何系统中最有可能解决的问题:

  1. 插入的代码在插入时不会被系统修改
  2. 要插入的代码需要允许配置 复制
  3. 如果一旦插入,唯一可编辑的部分是文本节点,我会非常高兴
  4. 并粘贴这些整个对象
  5. 一个干净的界面,可以从我的代码块范围中进行选择

这是我认为的一个严格的要求列表,大量的搜索引导了我Kompoze 及其“智能小部件”,根据 2004 年的一篇随机帖子,建议可以创建 XUL 文件并进行扩展,这听起来模糊地像我想要的那样。与 Dreamweaver 相比,文本编辑器本身不易被破坏。

所以是的,我在这方面已经追过太多兔子了,热衷于寻找一种解决方案,无论是软件+扩展还是 Web 应用程序。

编辑: 顺便说一句,我确实想到要调查一个高度定制的 TinyMCE 实例,但我不知道这是可行的,除非有一些可用的后端,否则我现在只能在本地编辑文件 - 即使在网络上也不能服务器...

在我看来,这个问题的最佳答案将解决上述大部分问题,并在建议的同时提供一些一般的工作流程建议。

Ok, my question's not as broad as it seems, to summarize 8 months effort on my part:

I create chunks of re-usable, extensible XHTML which degrades gracefully and is all kinds of awesome. Most of my code chunks are provided a Javascript interaction layer, and are styled with CSS. I set to work pulling my code chunks into Dreamweaver as 'Snippets' but they're unintelligent chunks of text. Also, once inserted, my beautiful code chunks get mangled by the non-techies who are the ones actually using Dreamweaver.

Also, because they're unintelligent snippets, I have a line of Javascript which configures the code chunks when initialised - see this post for further detail on my approach. But currently I have to replicate a single code chunk as many times as there are configuration options (so each 'snippet' may only differ from another of the same type by ONE config value). This is incredibly lame, it works, but its lame and time-consuming for me to re-deploy a bunch of snippets and hard for my team to remember all the variations.

So I have a series of requirements, to my mind, as the most likely things to solve in any system I put my chunks into:

  1. The inserted code is not modified at insertion time, by the system
  2. The code to be inserted needs to allow config options
  3. I'd be overjoyed if, once inserted, the only editable parts are text nodes
  4. Copy and pasting these whole objects
  5. A clean interface from which to choose from my range of code chunks

It's a serious list of requirements I presume, much searching led me to Kompoze and its 'Smart widgets' which, according to a random post from 2004, suggests XUL files can be created and extensions can be made which sounds vaguely like what I want. The text editor itself was less prone to destruction, when compared to Dreamweaver.

So yeah, I've chased too many rabbits on this one, keen as for a solution whether Software+extension, or Webapp.

EDIT:
Btw, it did occur to me to investigate a highly customised TinyMCE instance, but I don't know feasible that is, and unless there's some sweet backend available, I'm stuck with local editing of files for now - not even on a web server...

To my mind the best answer to this question will solve most of the above, and provide some general workflow advice alongside the suggestion(s).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

策马西风 2024-10-10 01:45:40

我会选择基于优秀的 markItUp! 编辑器的解决方案。扩展它来满足您的需求非常简单。您可以添加复杂的逻辑,而且它非常漂亮且闪亮。

我可能会将其与 Jeditable 结合起来进行内联节点编辑,并在顶部构建整个内容Django 的,为了简单和方便。完全可定制,非常易于使用,可移植和跨平台,并且易于设置以供离线使用。哦,而且都是免费和开源的。

I would go with a solution based around the excellent markItUp! editor. It's very simple to extend it to cope with the requirements you have. You can add sophisticated logic, and it's nice and shiny.

I'd probably combine it with Jeditable for the inline node editing, and build the whole thing on top of Django, for ease and convenience. Completely customisable, surprisingly easy to work with, portable and cross-platform, and easy to set-up for off-line use. Oh, and all free and open-source.

行雁书 2024-10-10 01:45:40

您如何看待这种方法:

<div class="thing">
    <elements... />
    <script type="text/javascript">
      document.write('<span id="thing' + thingNo + '"></span>')
      new Thing().init({ id:'thing'+thingNo; });
      thingNo += 1;
    </script>
</div>

当然,您必须更改 Thing().init 以便它初始化父(而不是当前)节点。

What do you think of this approach:

<div class="thing">
    <elements... />
    <script type="text/javascript">
      document.write('<span id="thing' + thingNo + '"></span>')
      new Thing().init({ id:'thing'+thingNo; });
      thingNo += 1;
    </script>
</div>

Of course, you'll have to change Thing().init so that it would initialize the parent (instead of current) node.

海螺姑娘 2024-10-10 01:45:40

您是否考虑过 服务器端包含,其中指令是生成的页面或 shell 命令?例如:

<!--#include virtual="./activePage.aspx?withParam1=something&param2=somethingelse" -->

或者

<!--#exec cmd="shellCommand -withParams" -->

您可以重复使用相同的页面或命令,并提供特定于每个 XHTML 页面中的每种用法的参数。

Have you considered server-side includes where the directive is either a generated page or a shell command? E.g.:

<!--#include virtual="./activePage.aspx?withParam1=something&param2=somethingelse" -->

or

<!--#exec cmd="shellCommand -withParams" -->

You can reuse the same page or command, and provide parameters specific to each usage in each XHTML page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文