ment contents info))
(org-text (or (org-element-interpret-data element)
original-contents
(error "no org-text found for %s" (car
element)
(if (org-ehtml-client-editable-p element info)
(org-fill-template org-ehtml-client-wrap-template
`(("html-text" . ,html-text)
("org-text" . ,org-text)
("begin" . ,(number-to-string
(plist-get (cadr element) :begin)))
("end" . ,(number-to-string
(plist-get (cadr element) :end)
html-text)
(eval `(org-export-define-derived-backend ehtml e-html
:translate-alist
((paragraph . ,(def-ehtml-wrap org-e-html-paragraph))
(plain-list . ,(def-ehtml-wrap org-e-html-plain-list))
(table . ,(def-ehtml-wrap org-e-html-table))
(verbatim. ,(def-ehtml-wrap org-e-html-verbatim))
(quote-block . ,(def-ehtml-wrap org-e-html-quote-block))
;; (src-block . ,(def-ehtml-wrap org-e-html-src-block))
(verse-block . ,(def-ehtml-wrap org-e-html-verse-block)
(defun org-ehtml-client-export-to-html
(&optional subtreep visible-only body-only ext-plist pub-dir)
"Export current buffer to an editable HTML file."
(interactive)
(let* ((extension (concat "." org-e-html-extension))
(file (org-export-output-file-name extension subtreep pub-dir))
(org-export-coding-system org-e-html-coding-system)
;; custom headers
(org-e-html-style-extra (concat org-e-html-style-extra "\n"
org-ehtml-client-style))
(org-e-html-scripts (concat org-e-html-scripts "\n"
(org-ehtml-client-scripts
(org-export-to-file 'ehtml file subtreep visible-only body-only
ext-plist)))
(defun org-ehtml-client-export-file (file)
"Export FILE's contents to editable HTML."
(save-window-excursion
(find-file file)
(org-ehtml-client-export-to-html)))
(defun org-ehtml-client-cached (file)
"Export FILE to editable HTML if no previous export exists.
If a previous HTML export of FILE exists but is older than FILE
re-export."
(flet ((age (f)
(float-time
(time-subtract (current-time)
(nth 5 (or (file-attributes (file-truename f))
(file-attributes f)))
(let* ((base (file-name-sans-extension file))
(html (concat base ".html"))
(org (concat base ".org")))
(if (and (file-exists-p org)
(or (not (file-exists-p html)) (> (age html) (age org
(org-ehtml-client-export-file org)
html
(provide 'org-ehtml-client)
this provides the org-ehtml-client where the client can make the changes to
the org-file viewed as an editable web page and editable function (defun
org-ehtml-client-editable-p (element info).
If anyone comes with some solution to make the org-file exported as an
editable web page where one can edit the parent headings and subheadings of
the content , kindly reply back.
Thanks
Nitin Agarwal
On Mon, Oct 29, 2012 at 1:29 PM, Nitin Agarwal
wrote:
> The edit option comes only for the content of the headings. We can't edit
> the headings and the subheadings of the headings.
> So the source code has to be modified to make the org-mode document
> editable as HTML where we can edit the Headings and subheadings.
> The edit button appears only for the content of the subheadings or
> headings of the document.
> So we have to modify the org-ehtml to inculcate this feature.
>
> thanks
> Nitin Agarwal
>
>
>
> On Sun, Oct 28, 2012 at 8:35 PM, Simon Thum wrote:
>
>> On 10/28/2012 04:19 PM, Eric Schulte wrote:
>>
>>> Yes, the content of the edit boxes does come from the exported html.
>>> For each portion of the Org-mode document (as delimited by
>>> org-elements), both the raw Org-mode text and the HTML are exported
>>> side-by-side, then the raw Org-mode text is hidden and the HTML is
>>> displayed, until the [edit] button is pushed at which point JavaScript
>>> is used to hide the HTML and to expose the raw Org-mode text in an edit
>>> box. When edits are committed they are committed one portion (edit-box)
>>> at a time.
>>>
>>> Does this make sense?
>>>
>>> Why would something need to change for "this" to be reliable?
>>>
>> No, that sounds correct in principle. But my whitespace got eaten
>> nonetheless ;(
>>
>> I'll be investigating further.
>>
>> Cheers,
>>
>> Simon
>>
>>
>>
>
>
> --
> *Nitin Agarwal*
> Computer Science and Engineering Student
> International Institute of Information Technology
> Gachibowli, Hyderabad 500 032
> Andhra Pradesh, India
> Phone : +91-9573572831
> E-mail: nitinagarwal3...@gmail.com
>*nitin.agar...@students.iiit.ac.in*
>
--
*Nitin Agarwal*
Computer Science and Engineering Student
International Institute of Information Technology
Gachibowli, Hyderabad 500 032
Andhra Pradesh, India
Phone : +91-9573572831
E-mail: nitinagarwal3...@gmail.com
*nitin.agar...@students.iiit.ac.in*