Skip to content

Commit

Permalink
description: added code plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatimah committed Nov 1, 2023
1 parent 8cde6ba commit a3adc26
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/lib/forms/RichInputField.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import CKEditor from "@ckeditor/ckeditor5-react";
import { Bold, Code, Italic, Strikethrough,Underline } from '@ckeditor/ckeditor5-basic-styles';

Check failure on line 10 in src/lib/forms/RichInputField.js

View workflow job for this annotation

GitHub Actions / Tests (18.x)

Replace `·Bold,·Code,·Italic,·Strikethrough,Underline·}·from·'@ckeditor/ckeditor5-basic-styles'` with `⏎··Bold,⏎··Code,⏎··Italic,⏎··Strikethrough,⏎··Underline,⏎}·from·"@ckeditor/ckeditor5-basic-styles"`

Check failure on line 10 in src/lib/forms/RichInputField.js

View workflow job for this annotation

GitHub Actions / Tests (16.x)

Replace `·Bold,·Code,·Italic,·Strikethrough,Underline·}·from·'@ckeditor/ckeditor5-basic-styles'` with `⏎··Bold,⏎··Code,⏎··Italic,⏎··Strikethrough,⏎··Underline,⏎}·from·"@ckeditor/ckeditor5-basic-styles"`
import { FastField, Field, getIn } from "formik";
import PropTypes from "prop-types";
import React, { Component } from "react";
Expand All @@ -15,7 +16,13 @@ import { ErrorLabel } from "./ErrorLabel";

export class RichInputField extends Component {
renderFormField = (formikBag) => {
const { editorConfig, fieldPath, label, required, className } = this.props;
const { fieldPath, label, required, className } = this.props;
const editorConfig = {
plugins: [ Bold, Italic, Underline, Strikethrough, Code ],

Check failure on line 21 in src/lib/forms/RichInputField.js

View workflow job for this annotation

GitHub Actions / Tests (18.x)

Replace `·Bold,·Italic,·Underline,·Strikethrough,·Code·` with `Bold,·Italic,·Underline,·Strikethrough,·Code`

Check failure on line 21 in src/lib/forms/RichInputField.js

View workflow job for this annotation

GitHub Actions / Tests (16.x)

Replace `·Bold,·Italic,·Underline,·Strikethrough,·Code·` with `Bold,·Italic,·Underline,·Strikethrough,·Code`
toolbar: {
items: [ 'bold', 'italic', 'underline', 'strikethrough', 'code' ]

Check failure on line 23 in src/lib/forms/RichInputField.js

View workflow job for this annotation

GitHub Actions / Tests (18.x)

Replace `··items:·[·'bold',·'italic',·'underline',·'strikethrough',·'code'·]` with `items:·["bold",·"italic",·"underline",·"strikethrough",·"code"],`

Check failure on line 23 in src/lib/forms/RichInputField.js

View workflow job for this annotation

GitHub Actions / Tests (16.x)

Replace `··items:·[·'bold',·'italic',·'underline',·'strikethrough',·'code'·]` with `items:·["bold",·"italic",·"underline",·"strikethrough",·"code"],`
}

Check failure on line 24 in src/lib/forms/RichInputField.js

View workflow job for this annotation

GitHub Actions / Tests (18.x)

Insert `,`

Check failure on line 24 in src/lib/forms/RichInputField.js

View workflow job for this annotation

GitHub Actions / Tests (16.x)

Insert `,`
};
const value = getIn(formikBag.form.values, fieldPath, "");
const initialValue = getIn(formikBag.form.initialValues, fieldPath, "");
const error =
Expand Down

0 comments on commit a3adc26

Please sign in to comment.