Inserire qui sotto la propria password per il wiki remoto.
/!\ È necessario fidarsi di entrambi i wiki, poiché agli amministratori è possibile leggere la password.

Nascondi questo messaggio
Italiano English
Locked History Actions

HelpOnMacros/EmbedObject



EmbedObject

This macro is used to Embed an Object into a wiki page-- objects being things usually handled by plug-ins, such as Flash, PDF, or movies. Optional size of the object could be adjusted. Further keywords are dependent on the kind of application.

If the attachment file isn't uploaded yet the attachment line will be shown.

(!) New in 1.6: MoinMoin has new (for some target types rather experimental) transclusion syntax like this: {{target|desc|params}}.

Enabling EmbedObject

EmbedObject is an included standard moin macro since version 1.5.4. However, for security reasons, mimetypes have to be specifically enabled in your wikiconfig.py to enable EmbedObject.

  1. In your wikiconfig.py file, under the "Content options" section, add the following lines:

        mimetypes_xss_protect = ['text/html', 'application/x-shockwave-flash', 'application/xhtml+xml',] 
    
        mimetypes_embed = ['application/x-dvi', 'application/postscript', 'application/pdf', 'application/ogg', 'application/vnd.visio', 'image/x-ms-bmp', 'image/svg+xml', 'image/tiff', 'image/x-photoshop', 'audio/mpeg', 'audio/midi', 'audio/x-wav', 'video/fli', 'video/mpeg', 'video/quicktime', 'video/x-msvideo', 'chemical/x-pdb', 'x-world/x-vrml',] 
  2. You should specifically add and/or remove content types from the mimetypes_embed to only those you need to use on your site. For example, if you need Flash, move the 'application/x-shockwave-flash' from the mimetypes_xss_protect to the mimetypes_embed line.

see related: HelpOnConfiguration

supported mimetypes:

  • application/x-shockwave-flash
  • application/x-dvi
  • application/postscript
  • application/pdf
  • application/ogg
  • application/vnd.visio
  • image/x-ms-bmp
  • image/svg+xml
  • image/tiff
  • image/x-photoshop
  • audio/mpeg
  • audio/midi
  • audio/x-wav
  • video/fli
  • video/mpeg
  • video/quicktime
  • video/x-msvideo
  • chemical/x-pdb
  • x-world/x-vrml

Syntax & Usage

<<EmbedObject(attachment[,option][,option])>>

Keyword Parameters:

Dependent on the mimetype class a different set of keywords is used from the defaults:

  width = ""
  height = ""
  play = false
  loop = false
  quality = high
  op = true
  repeat = false
  autostart = false
  menu = true
  hidden = false

All mimetypes support width & height parameters.

Additionally:

  • 'video' supports  repeat, autostart, menu, op 

  • 'audio' supports  play, repeat, autostart, op, hidden 

    • the default width is 60 and default height is 20
  • 'application' supports play, menu, autostart 

Examples

Basic examples:

<<EmbedObject(example.swf)>>
<<EmbedObject(example.pdf)>>
<<EmbedObject(example.svg)>>

Realistic examples:

<<EmbedObject(testpdf.pdf,width=100%,height=600)>>
<<EmbedObject(example.swf,width=637,height=392,play=true,loop=true)>>