checkAllHtmlTagsAreCreatable example

    // fundamental compatibility problem.     $this->checkNoMarkupFilters($text_editor->getFilterFormat()$constraint);
    if ($this->context->getViolations()->count() > 0) {
      return;
    }
    $this->checkHtmlRestrictionsAreCompatible($text_editor->getFilterFormat()$constraint);
    if ($this->context->getViolations()->count() > 0) {
      return;
    }

    // Second: ensure that all tags can actually be created.     $this->checkAllHtmlTagsAreCreatable($text_editor$constraint);

    // Finally: ensure the CKEditor 5 configuration's ability to generate HTML     // markup precisely matches that of the text format.     $this->checkHtmlRestrictionsMatch($text_editor$constraint);
  }

  /** * Checks no TYPE_MARKUP_LANGUAGE filters are present. * * Two TYPE_MARKUP_LANGUAGE filters are exempted: * - filter_autop: pointless but harmless to have enabled * - filter_url: not recommended but also harmless to have enabled * * These two commonly enabled filters with a long history in Drupal are * considered to be acceptable to have enabled. * * @param \Drupal\filter\FilterFormatInterface $text_format * The text format to validate. * @param \Drupal\ckeditor5\Plugin\Validation\Constraint\FundamentalCompatibilityConstraint $constraint * The constraint to validate. */
Home | Imprint | This part of the site doesn't use cookies.