CKEDITOR.Table Class
src/core/table.js:4
Table class utility. Provides methods for create, delete and update tables.
Constructor
CKEDITOR.Table
-
editor
Parameters:
-
editor
ObjectThe CKEditor instance.
Index
Methods
_createElement
-
name
Creates a new CKEDITOR.dom.element using the passed tag name.
Parameters:
-
name
StringThe tag name from which an element should be created
Returns:
Instance of CKEDITOR DOM element class
create
-
config
Creates a table.
Parameters:
-
config
ObjectTable configuration object
Returns:
The created table
getFromSelection
()
CKEDITOR.dom.element
Retrieves a table from the current selection.
Returns:
The retrieved table or null if not found.
getHeading
-
table
Returns which heading style is set for the given table.
Parameters:
-
table
CKEDITOR.dom.elementThe table to gather the heading from. If null, it will be retrieved from the current selection.
Returns:
The heading of the table. Expected values are CKEDITOR.Table.NONE
, CKEDITOR.Table.ROW
, CKEDITOR.Table.COL
and CKEDITOR.Table.BOTH
.
remove
-
table
Removes a table from the editor.
Parameters:
-
table
CKEDITOR.dom.elementThe table element which table style should be removed.
setAttributes
-
table
-
attrs
Assigns provided attributes to a table.
Parameters:
-
table
ObjectThe table to which the attributes should be assigned
-
attrs
ObjectThe attributes which have to be assigned to the table
setHeading
-
table
-
heading
Sets the appropriate table heading style to a table.
Parameters:
-
table
CKEDITOR.dom.elementThe table element to which the heading should be set. If null, it will be retrieved from the current selection.
-
heading
StringThe table heading to be set. Accepted values are:
CKEDITOR.Table.NONE
,CKEDITOR.Table.ROW
,CKEDITOR.Table.COL
andCKEDITOR.Table.BOTH
.