[smartymixed mode] Smarty tags in HTML attributes break

Closes #1768
[php mode] Add new built-in keywords/functions
Add resetSelectionOnContextMenu option
Add documentation for resetSelectionOnContextMenu

Issue #1857