Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #304 from serlo/exercise-with-textarea
Browse files Browse the repository at this point in the history
feat: Add text area exercise type
  • Loading branch information
LarsTheGlidingSquirrel authored Dec 8, 2023
2 parents 0397913 + 5e2aff1 commit a9a68fc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/frontend/plugins/create-plugins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { createTextPlugin } from '@/serlo-editor/plugins/text'
import { createEdusharingAssetPlugin } from './edusharing-asset'
import { createSerloInjectionPlugin } from './serlo-injection'
import { createMultimediaPlugin } from '@/serlo-editor/plugins/multimedia'
import { textAreaExercisePlugin } from '@/serlo-editor/plugins/text-area-exercise'
import { unsupportedPlugin } from '@/serlo-editor/plugins/unsupported'
import { PluginsWithData } from '@frontend/src/serlo-editor/plugin/helpers/editor-plugins'
import { createSpoilerPlugin } from '@/serlo-editor/plugins/spoiler'
Expand Down Expand Up @@ -137,6 +138,10 @@ export function createPlugins({ ltik }: { ltik: string }): PluginsWithData {
},
icon: <IconFallback />,
},
{
type: EditorPluginType.TextAreaExercise,
plugin: textAreaExercisePlugin,
},
{
type: EditorPluginType.ScMcExercise,
plugin: {
Expand Down
5 changes: 5 additions & 0 deletions src/frontend/plugins/create-renderers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { ExerciseStaticRenderer } from '@/serlo-editor/plugins/exercise/static'
import { StaticSolutionRenderer } from '@/serlo-editor/plugins/solution/static'
import { EdusharingAssetStaticRenderer } from './edusharing-asset/static'
import { SerloInjectionStaticRenderer } from './serlo-injection/static'
import { TextAreaExerciseStaticRenderer } from '@/serlo-editor/plugins/text-area-exercise/static'

const EquationsStaticRenderer = dynamic<EditorEquationsDocument>(() =>
import('@/serlo-editor/plugins/equations/static').then(
Expand Down Expand Up @@ -118,6 +119,10 @@ export function createRenderers(): InitRenderersArgs {
return <InputExerciseStaticRenderer {...props} />
},
},
{
type: EditorPluginType.TextAreaExercise,
renderer: TextAreaExerciseStaticRenderer,
},
{
type: EditorPluginType.ScMcExercise,
renderer: (props: EditorScMcExerciseDocument) => {
Expand Down

1 comment on commit a9a68fc

@vercel
Copy link

@vercel vercel bot commented on a9a68fc Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.