Thanks for the reply, that helps.

To answer my own question, it is ContentTextNode.insertData that calls
nodelet.insertData to insert the new character into the text node.

On Wed, Apr 25, 2012 at 8:24 PM, Patrick Coleman <[email protected]>wrote:

> Check out ContentTextNode:
>
> https://svn.apache.org/repos/asf/incubator/wave/trunk/src/org/waveprotocol/wave/client/editor/content/ContentTextNode.java
>
> editor/content/<...> includes the DOM which map the wave document to DOM,
> with ContentTextNode mapping to Text nodes
> although due to browser treatment of text nodes, there's some extra
> splitting/merging/repairing normalisation for when there's not a 1:1 wave
> dom -> html DOM map.
>
> On 26 April 2012 13:04, Dylan Dandelion <[email protected]> wrote:
>
> > Thanks for the reply.
> >
> > I am actually interested in finding the class/method in the code that
> > inserts the new character I typed into the DOM.
> >
> > I am debugging using hosted-gwt, and it seems
> > EditorEventHandler.handleNormalTyping returns true, which means that the
> > event is handled and browser doesn't need to handle it. If this is the
> > case, then there is presumably some code that updates the DOM with the
> new
> > character?
> >
> > Thanks.
> >
> > > If you need to get notified whenever user enters some text - you can
> > lookinto WaveTitleHandler class for example.
> >
> > On Wed, Apr 25, 2012 at 4:25 PM, Dylan Dandelion
> > <[email protected]>wrote:
> >
> > > I am looking at the source code trying to figure out exactly how the
> > > editor's DOM gets updated when I type a character or make change.
> > >
> > > I have read the design document at:
> > > http://www.waveprotocol.org/protocol/design-proposals/editor
> > >
> > > It seems EditorEventHandler.handleNormalTyping get called. This then
> goes
> > > into CMutableDocument.hackConsume and ContentDocument.consumeLocal
> which
> > > modifies the document.
> > >
> > > I am still trying to find the code that modifies the DOM, and what
> calls
> > > it. Any pointers or hints on where I should look into?
> > >
> > > Thanks.
> > >
> >
>

Reply via email to