Turning DIV into SPAN in EditTemplate prevents editing?

18 views
Skip to first unread message

Mark S.

unread,
Jun 17, 2013, 10:12:32 PM6/17/13
to tiddl...@googlegroups.com
Hello,

I'm trying to make my own EditTemplate that will display an embedded PDF at the same time that it allows the user (me) to enter the text that describes the PDF. Ideally I would display these two side by side. My technique was to take the two DIV tags that represent the embedded PDF and the text editor, turn them into SPAN tags, and then put them into a table.

Everything works perfectly EXCEPT that I can't enter keystrokes into the text editor portion of the viewer. I can put my cursor inside, but any keystrokes apparently get redirected to the scrolling action of the embedded PDF.  I think it has something to do with having used SPAN tags.

I could just leave the tags as DIV, and everything would work fine (I think). But then the embedded view and the text would be one above the other. I would prefer to have the two objects side by side.

I also tried using styles to float either the DIV for the PDF iframe or the DIV for the text editor (instead of using SPAN). However, I couldn't get the text DIV to float to one side. It always wants to be above or below the other DIV.
 
Any suggestions? Code details below.

Thanks!
Mark

----

Here's the special EditTemplate I'm using:

<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<table border='1' width='100%'><tr><td width='50%' valign='top'>
<span class='editor' macro='edit text' style='height:100%'></span>
</td><td valign='top'>
<span class='tiddler' macro='tiddler receiptEditStuffing with: {{story.findContainingTiddler(place.parentNode).getAttribute("tiddler")}}' > </span>
</td></tr></table>

<!-- <div>Template: <span macro="edit template"></span></div> -->
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->


and here is the value of receiptEditStuffing:

<html>
<iframe src='$1.pdf' frameborder="0"  height="400"></iframe>
</html>


Reply all
Reply to author
Forward
0 new messages