Questions below were designed to showcase the different features
of
pl-rich-text-editor.
The goal of pl-rich-text-editor
is to allow users to directly write or modify formattable text within their web browser. To require students to edit unformatted text, such as source code,
please consider using pl-file-editor.
Note:There is no autograding setup for this example. While it may be possible to use autograding for the HTML code generated by this element, the element is designed with a focus on manual grading.
The default behavior for the pl-rich-text-editor
element is displayed here.
What is the meaning of life?
If there is more than one pl-rich-text-editor element on the
page, additional instances of the element must be given a unique
file-name attribute. This attribute is the name of the file
where the student answer will be saved to. Also, the rich text editor can be
pre-populated with a starter template by adding text into the element, or by
using
source-file-name="initial.html".
How many woodchucks would a woodchuck chuck if a woodchuck could chuck wood? Justify.
A character or word counter can be turned on by setting counter="character" or
counter="word" respectively. The default setting, counter="none",
disables the counter.
This element also supports the ability to disable clipboard operations
like cut, copy and paste, by setting clipboard-enabled="false".
In such cases, attempts to use clipboard operations will be ignored. Note
that the editor content is still available in the browser's developer tools,
which would allow students to copy the content anyway. Also note that
preventing operations like copying or pasting text may be detrimental to the
student's experience, and as such should be avoided unless absolutely
necessary.
Clipboard operations (cut, copy, paste) are not available for this question.
Other themes may
also be used by
setting quill-theme="bubble". The bubble
theme, for example, hides the toolbar, but opens a tooltip
when the user selects some text, with common formatting
options.
How do you fry an egg?
The element also supports setting the initial content using Markdown
format by setting format="markdown". This option allows the
source file name or content to be interpreted in this format. The student
experience will not typically be significantly affected. The output format
of the file is still set to HTML, as a conversion to Markdown may cause
loss of data or formatting.
What are the steps necessary to create a peanut butter and jam sandwich?
A minimum word count can be enforced using min-word-count.
Submissions with fewer words will be marked as invalid. The word counter is
automatically enabled when bounds are set.
Write at least 10 words describing your favorite season.
A maximum word count can be enforced using max-word-count.
Submissions exceeding the limit will be marked as invalid.
In at most 25 words, summarize the plot of your favorite movie.
Both min-word-count and max-word-count can be
used together to require answers within a specific range.
Write between 50 and 100 words explaining why you chose your major.