Skip to content

Better separation of Model from View. #241

@TomasMikula

Description

@TomasMikula

StyledTextArea is a Node and as such takes care of rendering the visual representation of a document. In other words, StyledTextArea is the view. A big part of the model is represented by EditableStyledDocument, which is independent of the view. However, some parts of the model currently leak into StyledTextArea; namely undo/redo, caret position and selection. As a result, for example, to test undo/redo, one needs to instantiate the view, even though undo/redo itself doesn't depend on the view.

I propose to introduce a class (StyledTextAreaModel) to encapsulate the model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions