• Anonymous
  • Login
  • Register
DominoWiki - Feature Request: Ability to easily add file resources (specifically images) to the content.


I wrote this mod for the WikiPage class convertSingleBrackets function.

'** [image:filename_id!!filename.ext left|right] should become an <img> tag to a file resource within the database

'This !! syntax is used for entering image resources (images contained in resource documents)
'If present we need to extract specific information from the string, see above for syntax
intLoc1 = Instr(newText, "!!")

If intLoc1 <> 0 Then
'Get the filename id (eg TheFriendlyName) and the specified filename (eg AttachedImage.jpg)
'With this we need to generate the image url eg /PATH TO DATABASE/WebFiles/KEY/$File/FILENAME
'WebFiles - is the view containing the image documents
'Key - is the filename id
'Filename - is the image filename with extension
intLoc2 = Instr(newText, " ")
fileID = Mid(newText, (Instr(newText, ":")+1), intLoc1-7)
If intLoc2 <> 0 Then
fileName = Left(Strright(newText, "!!"), Instr(Strright(newText, "!!"), " ")-1)
Else
fileName = Mid(newText, intLoc1+2, Len(newText)-intLoc1-2)
End If
imagePath = Evaluate(|"../webfiles/| & fileID & |/$file/| & fileName & |"|)
leftText = "image:" & imagePath(0)
rightText = Strright(newText, " ")
Else
leftText = Strleft(newText, " ")
rightText = Strright(newText, " ")
End If



Taken Actions by Owners

No actions have been taken yet.


Documents
In this field you can enter the actual request.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.
In this field owners can describe what they have done or want to do.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.