Edgewall Software

Changes between Version 3 and Version 4 of TracDev/PluginDevelopment/ExtensionPoints/trac.wiki.api.IWikiMacroProvider


Ignore:
Timestamp:
Feb 26, 2012, 8:48:49 AM (12 years ago)
Author:
Peter Suter
Comment:

Inline macros

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/PluginDevelopment/ExtensionPoints/trac.wiki.api.IWikiMacroProvider

    v3 v4  
    4545
    4646(The `render_macro` method is deprecated and can be ignored. It was used in macros for Trac 0.9 and 0.10.)
     47
     48=== Inline macros
     49
     50Many macros expand to content that can not appear inline in a line of text, so macros are usually
     51replaced by a [[macro(...)]] indicator when used in ''outline'' or ''one line'' formatters.
     52
     53Since 0.13, macros implementing the optional `is_inline` method can appear in such inline content. They should of course produce inline XHTML in this case.
     54
     55Example:
     56The ''Span'' macro implements `is_inline`, the ''Div'' macro does not:
     57{{{
     58==== This [[Span(title, style=background:#ff7)]] contains an inline macro
     59==== This [[Div(title, style=background:#ff7)]] contains a non-inline macro
     60}}}
     61==== This [[Span(title, style=background:#ff7)]] contains an inline macro
     62==== This [[Div(title, style=background:#ff7)]] contains a non-inline macro
    4763
    4864== Examples ==