开发者

WYSIWYG HTML editor for grails gsp files

开发者 https://www.devze.com 2023-02-14 05:26 出处:网络
Does anyone know about a good HTML editor which can be configured in such a way that it is gsp aware?

Does anyone know about a good HTML editor which can be configured in such a way that it is gsp aware? What I mean is that at least tags such as <g:link> and <g:input> should be displayed as their html equivalent.

Yes I know: a perfect editor is hard to write and it is easier to edit the HTML sources (that's what I do), but there are people who prefer an HTML editor...

Update: yes, I am looking for a WYSIWYG HTML editor with which I can drag'n'drop some html elements to a page without changing the <g:...> tags which might already be contained in the page. In addition, this editor should have some gsp awareness, so that <g:...> tags are displayed in an appropriate way.

Update: still looking for something, so I started a bounty. What I need is something like this plugin: http://code.google.com/p/grails-form-builder-plugin/ but more evolved...

Bounty: not easy to select the right answer for the bounty. None of the answers is a solution to my problem, but I have decided that rschlachter points开发者_StackOverflow中文版 me in the right direction: a wysiwyg form editor is not the right solution for a developer...


I think there may be a flaw in the process here. You could build the page first in HTML and make any changes there before putting in any gsp elements. While the page is in HTML format people can continue to use WYSIWYG editors and then developers can add in the grails functionality.

It just seems like if you need/want to use a WYSIWYG editor, you shouldn't be modifying a gsp.

The iterations I prefer to use after I have gathered requirements are:

  1. wireframe
  2. mockup
  3. html
  4. gsp

If the gsps are already there (ie you inherited the project or something) you could go back a step and create an html only version of the page by pulling the gsp elements out and putting in images of them or replacing them with their html equivalents.


the IBM Maqetta Project seems to be going in the right direction:

http://maqetta.org/


Mercury editor might be worth looking at too. http://jejacks0n.github.com/mercury/

There is one more editor that you might want to look at:

  • Aloha Editor - http://www.aloha-editor.org/


Orbeon can be an option http://www.orbeon.com/orbeon/home/


Might be able to do this with TinyMCE by configuring the valid_elements or the extended_valid_elements (docs). For example, if you want to replace <g:link> and <g:input> you would do something like:

tinyMCE.init({
    valid_elements : "a/g:link,input/g:input"
});

OR If you want to simply enable the additional elements, then you could do something like:

tinyMCE.init({
    extended_valid_elements : "g:link,g:input"
});
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号