added option to control the default TinyMCE urls convert behavior
This commit is contained in:
@@ -523,6 +523,12 @@ func (o UrlOptions) Validate() error {
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
type EditorOptions struct {
|
||||
// ConvertUrls is usually used to instruct the editor whether to
|
||||
// apply url conversion (eg. stripping the domain name in case the
|
||||
// urls are using the same domain as the one where the editor is loaded).
|
||||
//
|
||||
// (see also https://www.tiny.cloud/docs/tinymce/6/url-handling/#convert_urls)
|
||||
ConvertUrls bool `form:"convertUrls" json:"convertUrls"`
|
||||
}
|
||||
|
||||
func (o EditorOptions) Validate() error {
|
||||
|
||||
@@ -505,7 +505,7 @@ func TestSchemaFieldInitOptions(t *testing.T) {
|
||||
{
|
||||
schema.SchemaField{Type: schema.FieldTypeEditor},
|
||||
false,
|
||||
`{"system":false,"id":"","name":"","type":"editor","required":false,"presentable":false,"unique":false,"options":{}}`,
|
||||
`{"system":false,"id":"","name":"","type":"editor","required":false,"presentable":false,"unique":false,"options":{"convertUrls":false}}`,
|
||||
},
|
||||
{
|
||||
schema.SchemaField{Type: schema.FieldTypeDate},
|
||||
|
||||
Reference in New Issue
Block a user