Documentation

Upgrade guide V2

Call

There are few changes in the new version and the main thing is only one. Now Article content works inside iframe, so when you run the editor you need to specify the path to css files.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/'
});

See the Css setting description for more details.

Settings

  • buffer.limit — state.limit
  • editor.undoredo — topbar.undoredo
  • editor.shortcutsPopup — topbar.shortcuts
  • editor.control — control
  • editor.multipleSelection — selection.multiple
  • grid.columns.size — grid.columns
  • grid.columns.gutter — grid.gutter
  • plaintext.markup — editor.markup
  • plaintext.classname — text.classname

Events

  • buffer.undo — state.undo
  • buffer.redo — state.redo
  • editor.content.before.load — editor.before.load
  • editor.content.load — editor.load
  • editor.content.before.change — editor.before.change
  • editor.content.change — editor.change
  • editor.content.set — editor.insert
  • editor.content.before.parse — editor.before.parse
  • editor.content.parse — editor.parse
  • editor.content.before.unparse — editor.before.unparse
  • editor.content.unparse — editor.unparse
  • editor.hover — editor.mouseover

API

  • app.container — container.get
  • editor.content.set — editor.setContent
  • editor.content.get — editor.getContent
  • editor.content.insert — editor.insertContent
  • editor.is — editor.isLayout
  • editor.isSourceMode — source.is
  • editor.isSelectedAll — editor.isAllSelected
  • editor.empty — editor.setEmpty
  • editor.rebuild — editor.build
  • editor.images.get — image.getStates
  • insertion.insertChar — insertion.insertHtml
  • utils.saveScroll — scroll.save
  • utils.restoreScroll — scroll.restore
  • utils.isInline — element.is
  • utils.isBlock — element.is
  • utils.isElement — element.is
  • utils.isEmpty — element.isEmpty
  • utils.cloneAttributes — element.cloneAttrs
  • utils.replaceToTag — element.replaceToTag
  • utils.createWrapper — utils.wrap