[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/lib/scripts/ -> edit.js (summary)

Functions for text editing (toolbar stuff)

Author: Andreas Gohr
File Size: 308 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  createToolButton()
  createPicker()
  pickerInsert()
  addBtnActionSignature()
  currentHeadlineLevel()
  deleteDraft()
  doku_hasTextBeenModified()
  doku_summaryCheck()

Functions
Functions that are not part of a class:

createToolButton(icon,label,key,id,classname)   X-Ref
Creates a toolbar button through the DOM
Called for each entry of toolbar definition array (built by inc/toolbar.php and extended via js)

Style the buttons through the toolbutton class

author: Andreas Gohr <andi@splitbrain.org>
author: Michal Rezler <m.rezler@centrum.cz>
param: {string} icon      image filename, relative to folder lib/images/toolbar/
param: {string} label     title of button, show on mouseover
param: {string} key       hint in title of button for access key
param: {string} id        id of button, and '<id>_ico' of icon
param: {string} classname for styling buttons

createPicker(id,props,edid)   X-Ref
Creates a picker window for inserting text

The given list can be an associative array with text,icon pairs
or a simple list of text. Style the picker window through the picker
class or the picker buttons with the pickerbutton class. Picker
windows are appended to the body and created invisible.

author: Andreas Gohr <andi@splitbrain.org>
param: {string} id    the ID to assign to the picker
param: {Array}  props the properties for the picker
param: {string} edid  the ID of the textarea
return: DOMobject    the created picker

pickerInsert(text,edid)   X-Ref
No description

addBtnActionSignature($btn, props, edid)   X-Ref
Add button action for signature button

author: Gabriel Birke <birke@d-scribe.de>
param: {jQuery} $btn   Button element to add the action to
param: {Array}  props  Associative array of button properties
param: {string} edid   ID of the editor textarea
return: {string} picker id for aria-controls attribute

currentHeadlineLevel(textboxId)   X-Ref
Determine the current section level while editing

author: Andreas Gohr <gohr@cosmocode.de>
param: {string} textboxId   ID of the text field

deleteDraft()   X-Ref
Delete the draft before leaving the page


doku_hasTextBeenModified()   X-Ref
No description

doku_summaryCheck()   X-Ref
Checks if a summary was entered - if not the style is changed

author: Andreas Gohr <andi@splitbrain.org>