0 results found


Contribute to this page

Installation Instructions

  1. Copy the insertdatetime directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
  2. Add plugin to TinyMCE plugin option list example: plugins : "insertdatetime".
  3. Add the insertdate or inserttime button name to button list, example: theme_advanced_buttons3_add : "insertdate,inserttime".

Initialization Example

  theme : "advanced",
  mode : "textareas",
  plugins : "insertdatetime",
  theme_advanced_buttons3_add : "insertdate,inserttime",
  plugin_insertdate_dateFormat : "%Y-%m-%d",
  plugin_insertdate_timeFormat : "%H:%M:%S"

Plugin options

plugin_insertdate_dateFormatFormat that the date is output as. Defaults to: "%Y-%m-%d".
plugin_insertdate_timeFormatFormat that the time is output as. Defaults to: "%H:%M:%S".

Replacement variables

%Dmm/dd/yy (same as %m/%d/%y)
%r12-hour clock time hh:mm:ss with AM or PM (same as %I:%M:%S %p)
%yyear as a decimal number without a century (range 00 to 99)
%Yyear as a decimal number including the century
%mmonth as a decimal number (range 01 to 12)
%Bfull localised month name (e.g. "January")
%babbreviated localised month name (e.g. "Jan")
%dday of the month as a decimal number (range 01 to 31)
%Afull localised weekday name (e.g. "Monday")
%aabbreviated localised weekday name (e.g. "Mon")
%Hhour as a decimal number using a 24-hour clock (range 00 to 23)
%Ihour as a decimal number using a 12-hour clock (range 01 to 12)
%Mminute as a decimal number (range 00-59)
%Ssecond as a decimal number (range 00-59)
%peither "am" or "pm" according to the given time value
%%a literal "%" character

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.