protected override void Write(UIElementRenderer renderer, TaskList taskList) { var checkbox = GetClassedElement <Toggle>("task-list"); checkbox.value = taskList.Checked; checkbox.SetEnabled(false); renderer.WriteInline(checkbox); }
protected override void Write(UIElementRenderer renderer, CodeInline obj) { var codeInline = GetClassedElement <Label>("code"); codeInline.text = obj.Content; codeInline.RegisterCallback <AttachToPanelEvent>(OnAttach); renderer.WriteInline(codeInline); }
protected override void Write(UIElementRenderer renderer, LineBreakInline obj) { if (obj.IsHard) { renderer.WriteInline(GetClassedElement <Label>("linebreak")); } else { // Soft line break. renderer.WriteText(" "); } }