It looks like he posted a complete patch almost three years ago. What do we need to do to get this into trunk?
http://code.google.com/p/google-web-toolkit/issues/detail?can=2&start=0&num=100&q=formatBlock&colspec=ID%20Type%20Status%20Owner%20Milestone%20Summary%20Stars&groupby=&sort=&id=4554 On Wednesday, February 10, 2010 6:52:20 AM UTC-8, Joel Webber wrote: > > Sebastian, > > Sorry it's taken so long for anyone to respond. This sounds like useful > functionality, and I would suggest creating an issue ( > http://code.google.com/p/google-web-toolkit/issues/) and a patch for > public discussion (http://gwt-code-reviews.appspot.com/). That way it > will be easier for people to try out your patch and refine it. > > Cheers, > joel. > > On Fri, Jan 22, 2010 at 9:55 AM, Sebastian <use...@laliluna.de<javascript:> > > wrote: > >> Hello, >> >> I was missing the ability to format a block with <h1> - <h6> tags. I >> researched the topic and build a patch which allows to insert block >> tags. It makes use of the FormatBlock command. >> >> I would like to ask, if you are interested in the patch and discuss >> the coding decision I took. >> >> 1) >> I couldn't find any guidance on testing. I have tested with Safari 4, >> Firefox 3.5, IE 6, IE 8 and IE 8 in IE 7 mode. >> >> 2) >> Currently only the tags <h1> to <h6>, <pre>, <address> and <p> work >> stable across browsers. To limit the choice of tags, I have created an >> enum to limit the possible values. >> >> public static enum BlockTag { >> H1, H2, H3, H4, H5, H6, PRE, ADDRESS, P; >> final String OPEN = "<"; >> final String CLOSE = ">"; >> public String toTag() { >> return OPEN+name()+CLOSE; >> } >> } >> >> The advantage is that you cannot provide the wrong tags. The >> disadvantage is that you cannot provide tags which are for example >> supported in newer browser versions. >> >> The rest of the tag is just a new method in RichTextAreaImplStd. >> public void formatBlock(RichTextArea.BlockTag blockTag) { >> execCommand("FormatBlock", blockTag.toTag()); >> } >> >> Shall I leave it that way or turn it into a String parameter? >> >> 3) >> Should I create a bug tracking entry for this? >> >> If somebody is interested, here are some links, I found interesting >> while exploring the topic. >> >> http://discerning.com/topics/software/ttw.html >> http://help.dottoro.com/ljcvtcaw.php >> http://www.quirksmode.org/dom/execCommand.html >> >> Best Regards >> >> Sebastian Hennebrueder >> >> -- >> http://groups.google.com/group/Google-Web-Toolkit-Contributors >> > > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors