func (e *RichEdit) From() *json.RGATreeSplitNodePos {
	return e.from
}
From returns the start point of the editing range.
package operation
import (
	"github.com/yorkie-team/yorkie/pkg/document/json"
	"github.com/yorkie-team/yorkie/pkg/document/time"
)
type RichEdit struct {
	parentCreatedAt *time.Ticket
	from *json.RGATreeSplitNodePos
	to *json.RGATreeSplitNodePos
	latestCreatedAtMapByActor map[string]*time.Ticket
	content string
	attributes map[string]string
	executedAt *time.Ticket
}
func NewRichEdit(
	parentCreatedAt *time.Ticket,
	from *json.RGATreeSplitNodePos,
	to *json.RGATreeSplitNodePos,
	latestCreatedAtMapByActor map[string]*time.Ticket,
	content string,
	attributes map[string]string,
	executedAt *time.Ticket,
) *RichEdit {
	return &RichEdit{
		parentCreatedAt:           parentCreatedAt,
		from:                      from,
		to:                        to,
		latestCreatedAtMapByActor: latestCreatedAtMapByActor,
		content:                   content,
		attributes:                attributes,
		executedAt:                executedAt,
	}
}
func (e *RichEdit) Execute(root *json.Root) error {
	parent := root.FindByCreatedAt(e.parentCreatedAt)
	switch obj := parent.(type) {
	case *json.RichText:
		obj.Edit(e.from, e.to, e.latestCreatedAtMapByActor, e.content, e.attributes, e.executedAt)
		if e.from.Compare(e.to) != 0 {
			root.RegisterRemovedNodeTextElement(obj)
		}
	default:
		return ErrNotApplicableDataType
	}
	return nil
}