Skip to content

CSS wrapper for custom input fields #530

@jsa34

Description

@jsa34

Describe the bug
Unable to stylise a custom input field like the delivered BeerCSS inputs (floating label and border). In this case, I am trying to stylise django-prose-editor. Ideally, I would then like to place this custom input field, wrapped, into a native fieldset.

To Reproduce
Add an input field for django-prose-editor onto the page.

Expected behavior
A wrapper to contain the custom input field and make it align with the delivered input fields

Screenshots
N/A

Here is an example of the django-prose-editor I am trying to wrap, though:

<div class="prose-editor ">
   <textarea name="main-description" cols="40" rows="10" id="id_main-description" data-django-prose-editor-configurable="{&quot;extensions&quot;:{&quot;Document&quot;:true,&quot;Dropcursor&quot;:true,&quot;Gapcursor&quot;:true,&quot;Paragraph&quot;:true,&quot;Text&quot;:true,&quot;Menu&quot;:true,&quot;NoSpellCheck&quot;:true,&quot;History&quot;:true,&quot;Bold&quot;:true,&quot;Italic&quot;:true,&quot;Underline&quot;:true,&quot;BulletList&quot;:true,&quot;ListItem&quot;:true,&quot;OrderedList&quot;:true,&quot;HardBreak&quot;:true,&quot;Link&quot;:{&quot;enableTarget&quot;:true},&quot;Heading&quot;:{&quot;levels&quot;:[1,2,3,4,5,6]}},&quot;js_modules&quot;:[]}">&lt;p&gt;ftest&lt;/p&gt;</textarea>
   <div class="prose-menubar">
      <span class="prose-menubar__dropdown">
         <div class="prose-menubar__selected"><span class="prose-menubar__button material-icons" title="paragraph">notes</span></div>
         <div class="prose-menubar__picker" popover="auto">
            <div class="ProseMirror">
               <h1 data-name="heading1">Heading 1</h1>
               <h2 data-name="heading2">Heading 2</h2>
               <h3 data-name="heading3">Heading 3</h3>
               <h4 data-name="heading4">Heading 4</h4>
               <h5 data-name="heading5">Heading 5</h5>
               <h6 data-name="heading6">Heading 6</h6>
               <p data-name="paragraph">Paragraph</p>
            </div>
         </div>
      </span>
      <div class="prose-menubar__group"><span class="prose-menubar__button material-icons" title="unordered list" data-name="bulletList">format_list_bulleted</span><span class="prose-menubar__button material-icons" title="ordered list" data-name="orderedList">format_list_numbered</span><span class="prose-menubar__button material-icons hidden" title="List properties" data-name="orderedListProperties">tune</span></div>
      <div class="prose-menubar__group"><span class="prose-menubar__button material-icons" title="bold" data-name="bold">format_bold</span><span class="prose-menubar__button material-icons" title="italic" data-name="italic">format_italic</span><span class="prose-menubar__button material-icons" title="underline" data-name="underline">format_underline</span></div>
      <div class="prose-menubar__group"><span class="prose-menubar__button material-icons disabled" title="insert link" data-name="link">insert_link</span></div>
      <div class="prose-menubar__group"><span class="prose-menubar__button material-icons" title="undo" data-name="history:undo">undo</span><span class="prose-menubar__button material-icons disabled" title="redo" data-name="history:redo">redo</span></div>
   </div>
   <div contenteditable="true" role="textbox" translate="no" class="tiptap ProseMirror ProseMirror-focused" tabindex="0" spellcheck="false">
      <p>test</p>
   </div>
</div>

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
Add any other context about the problem here.
Django Prose Editor
But could apply any custom input.

P.S. Apologies if this is the wrong place to ask, and second apologies if I missed this already documented! I tried myself to no avail, and I couldn't see it documented anywhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions