protected override void Write(UIElementRenderer renderer, CodeBlock obj) { var codeBlock = GetClassedElement <VisualElement>("code"); codeBlock.RegisterCallback <MouseUpEvent>(CopyToClipboard); renderer.Push(codeBlock); renderer.WriteLeafRawLines(obj); renderer.Pop(); }