using System; using System.Collections.Generic; using System.Text; namespace ScrewTurn.Wiki.PluginFramework { /// /// It is the interface that must be implemented in order to create a custom Formatter Provider for ScrewTurn Wiki. /// public interface IFormatterProviderV30 : IProviderV30 { /// /// Specifies whether or not to execute Phase 1. /// bool PerformPhase1 { get; } /// /// Specifies whether or not to execute Phase 2. /// bool PerformPhase2 { get; } /// /// Specifies whether or not to execute Phase 3. /// bool PerformPhase3 { get; } /// /// Gets the execution priority of the provider (0 lowest, 100 highest). /// int ExecutionPriority { get; } /// /// Performs a Formatting phase. /// /// The raw content to Format. /// The Context information. /// The Phase. /// The Formatted content. string Format(string raw, ContextInformation context, FormattingPhase phase); /// /// Prepares the title of an item for display (always during phase 3). /// /// The input title. /// The context information. /// The prepared title (no markup allowed). string PrepareTitle(string title, ContextInformation context); } /// /// Enumerates formatting Phases. /// public enum FormattingPhase { /// /// Phase 1, performed before the internal formatting step. /// Phase1, /// /// Phase 2, performed after the internal formatting step. /// Phase2, /// /// Phase 3, performed before sending the page content to the client. /// Phase3 } }