emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* suggestion: HTML frames option
@ 2010-05-04 21:33 Ilya Shlyakhter
  2010-05-05 15:56 ` Sebastian Rose
  0 siblings, 1 reply; 2+ messages in thread
From: Ilya Shlyakhter @ 2010-05-04 21:33 UTC (permalink / raw)
  To: emacs-orgmode

It would be good if the HTML exporter had an option to create a web
page with two frames:
in the top frame would be the original exported HTML, and in the
bottom frame would display
the targets of all external links in the org file.  Within-orgfile
links would still be shown in the
top frame. Then, the org file could serve as an "index" for organizing
a variety of information, and
one could browse the org file in the top frame and quickly see the
targets of external links
in the bottom frame, without having to switch tabs or windows in the browser.

There would be an option to have the index on the left, instead of on the top.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: suggestion: HTML frames option
  2010-05-04 21:33 suggestion: HTML frames option Ilya Shlyakhter
@ 2010-05-05 15:56 ` Sebastian Rose
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Rose @ 2010-05-05 15:56 UTC (permalink / raw)
  To: Ilya Shlyakhter; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]

Ilya Shlyakhter <ilya_shl@alum.mit.edu> writes:
> It would be good if the HTML exporter had an option to create a web
> page with two frames:
> in the top frame would be the original exported HTML, and in the
> bottom frame would display
> the targets of all external links in the org file.  Within-orgfile
> links would still be shown in the
> top frame. Then, the org file could serve as an "index" for organizing
> a variety of information, and
> one could browse the org file in the top frame and quickly see the
> targets of external links
> in the bottom frame, without having to switch tabs or windows in the browser.
>
> There would be an option to have the index on the left, instead of on the top.

Hi Ilya,


here is a solution in JavaScript.

Adjust the line

   #+STYLE:   var targetFrame = "otherFrame";

You could even receive the targetFrame as URL-Parameter.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-verbatim, Size: 931 bytes --]

#+STYLE: <script type="text/javascript">
#+STYLE: <!--/*--><![CDATA[/*><!--*/
#+STYLE: function modifyExternalLinks()
#+STYLE: {
#+STYLE:   if(null == document['body']) {
#+STYLE:     window.setTimeout("modifyExternalLinks()", 250);
#+STYLE:     return;
#+STYLE:   }
#+STYLE:   var targetFrame = "otherFrame";
#+STYLE:   var baseURL = document.URL;
#+STYLE:   if("" != location.hash)
#+STYLE:     baseURL = baseURL.substring(0, baseURL.indexOf('#'));
#+STYLE:   if("" != location.search)
#+STYLE:     baseURL = baseURL.substring(0, baseURL.indexOf('?'));
#+STYLE:   var regx = new RegExp("^baseURL", "gi");
#+STYLE:   var links = document.getElementsByTagName("a");
#+STYLE:   for(j=0; j<links.length; ++j)
#+STYLE:   {
#+STYLE:     if(! links[j].href.match(regx))
#+STYLE:     links[j].target = targetFrame;
#+STYLE:   }
#+STYLE: }
#+STYLE: window.setTimeout("modifyExternalLinks()", 250);
#+STYLE: *]]>*///-->
#+STYLE: </script>

[-- Attachment #3: Type: text/plain, Size: 23 bytes --]




HTH

   Sebastian



[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-05 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-04 21:33 suggestion: HTML frames option Ilya Shlyakhter
2010-05-05 15:56 ` Sebastian Rose

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).