diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js
index 04d30c1a65a31368e1ae456bc02e890b138c2d20..059a4ba5c3797c92cba86a29a49e89516d626499 100644
--- a/lib/scripts/toolbar.js
+++ b/lib/scripts/toolbar.js
@@ -94,7 +94,7 @@ function tb_format(btn, props, edid) {
  * @author Andreas Gohr <andi@splitbrain.org>
  */
 function tb_formatln(btn, props, edid) {
-    var sample = props.title || props.sample,
+    var sample = props.sample || props.title,
         opts,
         selection = getSelection(jQuery('#'+edid)[0]);