
interface EditorAppCore : BaseAppCore
{
/* IID: { 0x9afff72b, 0xca9a, 0x11d2, \
    {0x96, 0xc9, 0x0, 0x60, 0xb0, 0xfb, 0x99, 0x56}} */

  readonly attribute DOMString contentsAsText;
  readonly attribute DOMString contentsAsHTML;

  readonly attribute Document    editorDocument;
  readonly attribute Selection   editorSelection;
  readonly attribute DOMString   ParagraphFormat;
  
  attribute int wrapColumn;
  
  void EditorAppCore();
  
  void setEditorType(in DOMString editorType);
  void setTextProperty(in DOMString prop, in DOMString attr, in DOMString value);
  void removeTextProperty(in DOMString prop, in DOMString attr);
  void getTextProperty(in DOMString prop, in DOMString attr, in DOMString value, out DOMString firstHas, out DOMString anyHas, out DOMString allHas);
  void setBodyAttribute(in DOMString attr, in DOMString value);
  void setBackgroundColor(in DOMString color);

  DOMString getLocalFileURL(in Window parent, in DOMString filterType);
    
  void setParagraphFormat(in DOMString value);

  void loadUrl(in DOMString url);
  
  void newWindow();
  void open();
  void save();
  void saveAs();
  void closeWindow();
  void print();
  void exit();
  
  void undo();
  void redo();
  
  void cut();
  void copy();
  void paste();
  void pasteAsQuotation();
  void pasteAsCitedQuotation(in DOMString cite);
  
  void insertAsQuotation(in DOMString quotedText);
  void insertAsCitedQuotation(in DOMString quotedText, in DOMString cite);
  
  void selectAll();
  
  void find();
  void findNext();
  
  void beginBatchChanges();
  void endBatchChanges();
  
  void insertText(in DOMString textToInsert);

  void insertLink();
  void insertImage();
  void insertList(in DOMString listType);
  void indent(in DOMString indent);
  void align(in DOMString align);
  
  Element getSelectedElement(in DOMString tagName);
  Element createElementWithDefaults(in DOMString tagName);
  Element insertElement(in Element element, in boolean deleteSelection);
  void    insertLinkAroundSelection(in Element anchorElement);
  void    selectElement(in Element element);
  void    setCaretAfterElement(in Element element);
  
  void setToolbarWindow(in Window win);
  void setContentWindow(in Window win);
  void setWebShellWindow(in Window win);

  DOMString startSpellChecking();
  DOMString getNextMisspelledWord();
  DOMString getSuggestedWord();
  boolean checkCurrentWord(in DOMString suggestedWord);
  void replaceWord(in DOMString misspelledWord, in DOMString replaceWord, in boolean allOccurrences);
  void ignoreWordAllOccurrences(in DOMString word);
  void addWordToDictionary(in DOMString word);
  void removeWordFromDictionary(in DOMString word);
  DOMString getPersonalDictionaryWord();
  void closeSpellChecking();
  
  void runUnitTests();
};
