github.com/jancarloviray/community@v0.41.1-0.20170124221257-33a66c87cf2f/core/section/wysiwyg/wysiwyg.go (about)

     1  // Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
     2  //
     3  // This software (Documize Community Edition) is licensed under
     4  // GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
     5  //
     6  // You can operate outside the AGPL restrictions by purchasing
     7  // Documize Enterprise Edition and obtaining a commercial license
     8  // by contacting <sales@documize.com>.
     9  //
    10  // https://documize.com
    11  
    12  package wysiwyg
    13  
    14  import (
    15  	"net/http"
    16  
    17  	"github.com/documize/community/core/section/provider"
    18  )
    19  
    20  // Provider represents WYSIWYG
    21  type Provider struct {
    22  }
    23  
    24  // Meta describes us
    25  func (*Provider) Meta() provider.TypeMeta {
    26  	section := provider.TypeMeta{}
    27  
    28  	section.ID = "0f024fa0-d017-4bad-a094-2c13ce6edad7"
    29  	section.Title = "Rich Text"
    30  	section.Description = "Rich text WYSIWYG"
    31  	section.ContentType = "wysiwyg"
    32  	section.PageType = "section"
    33  	section.Order = 9999
    34  
    35  	return section
    36  }
    37  
    38  // Command stub.
    39  func (*Provider) Command(ctx *provider.Context, w http.ResponseWriter, r *http.Request) {
    40  	provider.WriteEmpty(w)
    41  }
    42  
    43  // Render returns data as-is (HTML).
    44  func (*Provider) Render(ctx *provider.Context, config, data string) string {
    45  	return data
    46  }
    47  
    48  // Refresh just sends back data as-is.
    49  func (*Provider) Refresh(ctx *provider.Context, config, data string) string {
    50  	return data
    51  }