OpenNTF.org - DominoWiki
DominoWikiOpenDocument[/projects/PMT.nsf/ProjectView?ReadForm&Query=DominoWiki~Discussion]

My Links (Not logged in)
User Name Password
Hosted by Prominic.NET

   Project: DominoWiki (Managed by Benedict R Poole)
Actions:


Subject
 Added capability for pic captions (oh, this also fixed space bug in pic names)
Categories
 Feedback
Posted by
 Randal Oulton on 01/10/2010 at 09:37 PM
Details

format of code in text:
[image:mypicture.jpg|left|my caption ]

I trim out spaces, so doesn't matter if spaces around the pipe symbol or not, as users can never remember.

If a caption is being supplied, then a left or right alignment must be supplied.

Here is the code, which replaced that in : convertSingleBracket function.

Case "image"
' Image
Dim rawrightText As String
Dim caption As string
leftText = StrRightBack(newText, ":")
linkText = StrLeft(leftText, "|")
If (Len(linkText) = 0) Then
linkText = leftText
End If
rawrightText = Trim(StrRight(leftText, "|"))
If ( InStr(rawrightText, "|") <> 0) Then
rightText=StrLeftBack(rawrightText, "|")
caption = Trim(StrRightBack(rawrightText, "|"))
Else
rightText = rawrightText
End If
newText = |<img class="wiki-img" src="/| & dbPath & "/Pages/" &_
Me.Subject & "/$file/" & linkText & |"|

If (Len(rightText) = 0) Then
newText = newText & |>|
Elseif (Lcase(rightText) = "right") Or (Lcase(rightText) = "left") Then
newText = |<div style="padding-top:10px;float:| & rightText & |">| & newText & |><p>| & caption & |</div><div style="padding-bottom:10px;clear:both"></div>|
Else
newText = newText & | alt="| & rightText & |">|
End If
Modification history
Entered 10-Jan-2010 21:37 by Randal Oulton. Last Modified 20-Jan-2010 2:43 by Randal Oulton.
Feedback

format of code in text: [image:mypi... (Randal Oulton on 01/10/2010 09:37:00 PM )
Check out other projects
Switch to project:


Anonymous