Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@editora/conditional-content

Latest version: v1.0.6

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: ajaykr089
3 Stars
0 Forks
5 Versions
202 Downloads
TypeScript Repo language

Scan summary

@editora/conditional-content was last scanned on 29 Nov 2026 at version 1.0.6. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 5 versions; the latest 2 were published within 3 days (27–29 Nov 2026).
  • Findings: No rules fired in version 1.0.6.
  • Downloads: 202 downloads.

Versions

5 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.6 LATEST 29 Nov 2026 No rules fired
1.0.5 27 Nov 2026 No rules fired
1.0.4 5 Oct 2026 No rules fired
1.0.3 5 Oct 2026 Not shown
1.0.2 2 Oct 2026 Not shown

No rules fired in 1.0.6

Findings

Findings for v1.0.6. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.6; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@editora/conditional-content

Version License TypeScript Size

[!IMPORTANT] Live Website: https://editora-ecosystem.netlify.app/\ Storybook: https://editora-ecosystem-storybook.netlify.app/

@editora/conditional-content adds template-style conditional blocks (IF/ELSE) to Editora, with audience/locale targeting and preview evaluation.

Features

  • Native framework-agnostic plugin (no framework dependency)
  • Works in React (Vite/CRA) and Web Component without changes
  • Insert/edit conditional blocks with:
    • condition expression
    • audience targeting
    • locale targeting
    • optional ELSE branch
  • Grouped toolbar controls for conditional rule + preview
  • Inline floating block actions (Edit / Delete) when caret is inside a conditional block
  • Preview mode to evaluate visible branch from runtime context
  • Multi-instance safe (per-editor preview/context state)
  • Accessible dialog (role="dialog", focus trap, Esc close)
  • Dark/light theme support

Install

npm install @editora/conditional-content

Basic Usage (React)

import { EditoraEditor } from '@editora/react';
import { ConditionalContentPlugin, BoldPlugin, HistoryPlugin } from '@editora/plugins';

const plugins = [
  BoldPlugin(),
  HistoryPlugin(),
  ConditionalContentPlugin({
    defaultCondition: 'user.role == "admin"',
    enableElseByDefault: true,
  }),
];

export default function App() {
  return <EditoraEditor plugins={plugins} />;
}

Basic Usage (Web Component)

<editora-editor id="editor"></editora-editor>
<script>
  const editor = document.getElementById('editor');
  editor.setConfig({
    plugins: 'bold history conditionalContent',
    toolbar: {
      items: 'bold undo redo | conditionalContent conditionalPreview',
    },
    pluginConfig: {
      conditionalContent: {
        defaultCondition: 'user.role == "admin"',
        enableElseByDefault: true,
      },
    },
  });
</script>

Accepted aliases: conditionalContent, conditional-content, conditionalcontent.

Toolbar Commands

  • openConditionalDialog → open insert/edit dialog
  • insertConditionalBlock → insert block directly with config
  • editConditionalBlock → edit currently selected conditional block
  • toggleConditionalPreview → preview on/off
  • deleteConditionalBlock → remove the currently selected conditional block
  • setConditionalContext → update runtime context for preview evaluation

Keyboard Shortcuts

  • Ctrl/Cmd + Alt + Shift + C → open conditional dialog
  • Ctrl/Cmd + Alt + Shift + P → toggle conditional preview
  • F9 → open conditional dialog (fallback)
  • F10 → toggle preview (fallback)
  • Esc → close conditional dialog

Condition Syntax (default evaluator)

Supported examples:

  • user.role == "admin"
  • locale == "en-US"
  • user.tier != "free"
  • order.total >= 100
  • user.tags contains "beta"
  • user.role in ["admin", "editor"]
  • feature.newDashboard (truthy)
  • !feature.newDashboard (falsy)

You can override evaluator with evaluateCondition.

Advanced Usage

Runtime context from API/state
ConditionalContentPlugin({
  async getContext({ editorRoot }) {
    const docId = editorRoot.getAttribute('data-doc-id');
    const res = await fetch(`/api/docs/${docId}/context`);
    if (!res.ok) return {};
    return res.json();
  },
  currentAudience: 'internal',
  currentLocale: 'en-US',
});
Custom evaluator
ConditionalContentPlugin({
  evaluateCondition(condition, context) {
    // Plug your own parser/evaluator here
    if (!condition) return true;
    return condition === 'always' || Boolean(context['featureEnabled']);
  },
});
Set/refresh context at runtime
(window as any).executeEditorCommand?.('setConditionalContext', {
  user: { role: 'editor' },
  audience: 'internal',
  locale: 'en-US',
});

(window as any).executeEditorCommand?.('toggleConditionalPreview', true);

Edge Cases Covered

  • Preview/edit state is isolated per editor instance.
  • Dialog focus is trapped; Esc always closes.
  • Preview mode locks conditional bodies to prevent accidental edits.
  • IF/ELSE body visibility updates after context changes.
  • Insertion preserves current selection content into the IF branch.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @editora/conditional-content

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229