|Extending the HTMLEditor with custom operations [message #617720]
||Sun, 20 April 2008 23:41
| Holger Knublauch
Registered: July 2009
For our product I am writing a plugin that extends the HTMLEditor with |
support for some refactoring operations on the DOM tree. For example, the
plugin contains a button to insert a <span /> element with some attributes
at the selected caret position. This works fairly well and most of the
functionality is in place. I have a couple of questions and very much
appreciate your opinion.
1) I have been looking for WYSIWYG editors based on Eclipse, but this JSF
editor seems to be the best available foundation. Is it the right
approach to extend this editor, or are there better alternatives. One
problem is that most of the API classes seem to be marked as internal and
don't seem to be recommended to be used by third-party plugins.
2) For operations that manipulate the document, I am directly changing the
(XML API) Document with calls such as element.appendChild(). Is this the
recommended way? If yes, how can I bundle multiple steps (such as
appending and then deleting elements) into a single workspace Operation so
that the user can undo them. I have tried to create an IUndoableOperation
but it seems to be split into multiple undoable steps.
3) How can I change syntax high-lighting so that certain HTML attributes
have a different color in the source code?
4) How can I add my own items to the code-completion of the source-code
Thanks a lot!
Powered by FUDForum
. Page generated in 0.02771 seconds