CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-tiptap--extension-link

Link extension for tiptap rich text editor providing automatic link detection, paste handling, click behavior, and XSS protection.

88

1.23x
Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how well the engineer integrates @tiptap/extension-link into a custom Tiptap extension with proper lifecycle management, state tracking, and command integration. The focus is entirely on correct usage of the Tiptap extension system and link extension API.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Extension structure",
      "description": "Creates a proper Tiptap extension using Extension.create() from @tiptap/core with a name property set to 'LinkManagerExtension' or similar",
      "max_score": 10
    },
    {
      "name": "Link extension integration",
      "description": "Properly includes the Link extension in the addExtensions() method with configuration options (autolink: true, openOnClick: true)",
      "max_score": 15
    },
    {
      "name": "onCreate lifecycle hook",
      "description": "Implements onCreate() lifecycle hook to initialize the link counting system when the editor is created",
      "max_score": 15
    },
    {
      "name": "onDestroy lifecycle hook",
      "description": "Implements onDestroy() lifecycle hook to clean up resources (event listeners, state) when the editor is destroyed",
      "max_score": 10
    },
    {
      "name": "Transaction-based updates",
      "description": "Uses onUpdate() or onTransaction() to track document changes and update link count, ensuring compatibility with undo/redo operations",
      "max_score": 20
    },
    {
      "name": "Link counting logic",
      "description": "Correctly counts links in the document by traversing the document structure and identifying link marks using the link mark type from the schema",
      "max_score": 15
    },
    {
      "name": "getLinkCount command",
      "description": "Implements getLinkCount command in addCommands() that returns the current link count, following Tiptap's command pattern",
      "max_score": 10
    },
    {
      "name": "External state access",
      "description": "Makes link count accessible from outside the editor (via storage, plugin state, or similar mechanism) so it can be used in UI components",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-tiptap--extension-link

tile.json