Hey Jason,

On Jun 5, 1:21 am, Jason <[email protected]> wrote:
> Hello,
>
> Thanks for releasing the rich texteditor, it looks really promising.
> Is there a basic getting started guide for theeditorin the works?

Not just yet, but hopefully in the near future :)

> I've managed to get it into my application but am having difficulty
> figuring out a few things:
>
> 1) How to get content in and out of theeditor/document. I've tried
> using DocInitializationBuilder with my existing content but get an
> exception (an OperationException thrown by
> IndexedDocumentImple::endChange() - the operation size is always
> exactly 4 less than the document size) when I call
> ContentDocument::consume() on the result of
> DocInitializationBuilder::build().
>

The problem might be that the editor is modifying the document to
contain the minimum it needs to allow basic editing (<body><line></
line></body>, which has 4 items). Are you calling that before or after
you put the content inside the document? You should create the
document first, then call Editor#setContent() with your
ContentDocument. Or, you can just call
Editor#setContent(DocInitialization, schema) and it will build a
ContentDocument for itself.

> 2) How to apply formatting/insert links/etc. with a palette. It
> doesn't appear that the rich texteditorincludes a default palette -
> how can I hook my own palette into theeditor?
>

Do you mean a toolbar? Unfortunately this is not yet open sourced.
There are some hard coded key combos that apply some styles, see
handleBlockLevelCommands and handleRangeKeyCombo inside EditorImpl for
some examples for doing stuff like headings, bullets, font styles,
etc. Those combos are (for now) hard coded inside the editor but the
components they use (selection and document) are accessible from
outside the editor. Also see EditorAnnotationUtil which is similar.

Let me know if that helps.

Dan



> Thanks in advance for any assistance you can provide,
> -Jason Terk

-- 
You received this message because you are subscribed to the Google Groups "Wave 
Protocol" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/wave-protocol?hl=en.

Reply via email to