emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question Regarding Creating HTML Style Buttons With Org Mode


From: Juan Manuel Macías
Subject: Re: Question Regarding Creating HTML Style Buttons With Org Mode
Date: Thu, 17 Feb 2022 22:10:29 +0000

Hi Samuel:

Samuel Banya writes:

> Is it possible to create HTML style buttons using Org Mode itself?

One possibility is to use a custom link. For example:

#+begin_src emacs-lisp
  (org-link-set-parameters "button"
                           :face '(:foreground "green" :underline t)
                           :export (lambda (path desc backend)
                                     (when (eq backend 'html)
                                       (format "<form><button 
class=\"mybutton\" formaction=\"%s\">%s</button></form>" path desc))))
#+end_src

#+HTML_HEAD: <style> 
.mybutton{background-color:#4CAF50;border:none;color:white;padding:15px32px;text-align:center;text-decoration:none;display:inline-block;font-size:18px;margin:4px2px;cursor:pointer;</style>

[[button:some target][This is a button]]

NB: I have borrowed the style from here: 
https://www.w3schools.com/csS/css3_buttons.asp

Best regards,

Juan Manuel 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]