ProseMirror provides an immutable data model, tools for configuring the document schema, and handles rendering the actual editor control for our node-based data structure. The Weka editor is implemented using the ProseMirror editor toolkit. For instance, the Totara Mobile app renders Weka content as React Native elements. Each of the nodes represents a single piece of content, such as a paragraph, a run of text, a user mention, or an embedded video.Īs Weka does not edit HTML, but rather an abstract node structure, HTML is just one possible way to render the node structure. Weka structures the content being edited as a tree of nodes. In places where Tui rendering is not used, such as standard course pages or dashboards, content created in Weka will be displayed in a simplified HTML format, which is the default output from format_text(). Most standard Weka plugins are made using Tui and allow the adding and displaying of interactive content. Tui is a front-end component library made for Totara and based on the Vue.js framework. On the web, Weka content can be rendered in three formats: Tui, regular HTML, and plain text. Custom plugins can also be added when needed. However, as Weka is a pluggable editor, the number of node types and styles will grow over time in line with users' needs and requirements. This also brings some limitations to formatting capabilities and styling, because each node implemented for Weka must also be implemented on a mobile client for each supported platform and checked that it is displaying correctly. This editor and its format were built to be agnostic of the output rendering, and allows proper rendering of all content types on a mobile client. Along with the editor itself, Weka brings a new format type into Totara format types (FORMAT_JSON_EDITOR) in addition to the existing HTML, plain text, Markdown and Moodle formats.Ī big motivating factor for creating a new editor was that existing formats had significant limitations for mobile rendering. It can be selected and used as a default editor along with Atto, plain text, and other editor plugins. Weka is a new content editor introduced in Totara 13.
0 Comments
Leave a Reply. |