tudisco
From twext
|
last night, Jason Tudisco pulled an all nighter to get text twext.. his original email is delirious.. i want to publish the whole thing to see if he makes me do a DCMA takedown order.. until then, here's the skinny:
[edit] cross browserThe code should work better a cross various browsers. Uses the Extjs core library to make cross browser coding easier. It also makes manipulating html easier. [edit] namespacesAll twexter code is now in the twexter namespace. [edit] exporterMy twext library has the twexter.exporter namespace. Which includes a HTML exporter. The html exporter takes a twext tree (JavaScript array) and generates html. The html generator uses templates. These template can be changed to use different html layouts. This allows for more flexibility. The idea is also to create other types of exporter. One idea is a pure javascript exporter to generate a much more accurate and cross broswer taxt layout engine. You can see an example here using the current html template and a new html template which works better in IE. http://tudisco.biz/stuff/twext/test_layout.html [edit] floating div - 3 rulesI created a new of laying out the text using floating div tags. It seems to behave better in IE. And the got the CSS rules done to just 3. Look at the source here: http://tudisco.biz/stuff/twext/test_layout.html [edit] playOk, so current generated html was bugging me.. and it was the base of everything so I needed to an alternative to play with. [edit] choicewe have Jason's HTML way and Original Way.. [edit] templatesSo my exporter uses templates. Which is wonderful.. The template default is automatically set to generate the old HTML you are using now. [edit] flexibilityBut I can use the same function and supply it another template... and now it generates JASON html as well.. [edit] wtfAnd if i discover some other HTML hacks.. I could very well create another template with out having to change the HTML exporter code. [edit] omgI also created a character width chunker. I also made a clunker interface which allows me to sorta add chunker plugins. [edit] pluginI can also mix chunkers together. I already have an example with a little bug, but working... that mixes the english word chunker with the line width chunker. Ok.. examples of my code is here: http://tudisco.biz/stuff/twext/tests.html [edit] cross browswer againThis morning I check it in opera,IE 7,firefox 2... all looking pretty good.. but I didn't spend alot of time in the non firefox browsers. [edit] translate.googleOk.. well I notices a few lines on un finished code for google translator... not sure if you guys were going to implement that or not.. [edit] omfgSo I went ahead and made that work too.. Example here: http://tudisco.biz/stuff/twext/tests_translate.html [edit] get realOf course this is not even getting close to your goal... [edit] toolwhere users have a tool to work with.. But programmers need tools also.. and the tool that was there sucked. I couldn't stop my self from redoing it. [edit] what i'm talking aboutit started out as just some clean up... but it just wasn't enough, one thing led to another and I had a completely new twext library. [edit] hahahaOk, well... I got other less interesting stuff to do.. so talk to you latter. Jason |

