jodit/jodit-react

Default Ordered, Default Unordered and Unordered Dot list not showing up properly in editor or after edit.

SanIbme opened this issue · 12 comments

Jodit Version: 3.4.xxxxx
jodit-react 1.3.39

Browser:
Chrome, Firefox
OS:
MacOS Sonoma
Is React App:
True (v17)

Code

import 'jodit';
import JoditEditor from 'jodit-react';

jodit;
setRef = jodit => this.jodit = jodit;

onBlur = (evt) => {
     let submitval = evt;
     if(this.state.content['value'] !== submitval) {
         //  all to update the content, post data
    } 
}
.
.
.

return (
<JoditEditor
      ref={this.setRef}
      value={this.state.content['value'] === "None" ? "" : this.state.content['value']}
      config={this.config}
      tabIndex={1}
      onBlur={this.onBlur} 
/>)

Expected behavior:
Bullets would appear in editor during edit and once saved.

Actual behavior:

  • Default and Dot unordered list or ordered list don't appear in editor or when complete. It seems it might be middle past far left of the editor box. The default doesn’t show up, even after moving the text into the editor.
  • Unordered Circle, Square and ordered (all except for Default) show up after completed edit and saved, just at the border of the editor text.

During Edit:

image

After Edit:
image

Hello Jodit Team and Community,
I've had this issue opened for a few weeks now. Can someone please look into this? I noticed that @xdan has been closing issues. I hope it's ok I tag you here. Please let me know what I can do to have this issue looked at and what's the right way to request help so I can get support? Thank you.

Hello Jodit Team and Community,
I noticed there was an issue xdan/jodit#799, which was closed. It seems I'm having similar issue, so not sure if the bug has returned. Can someone please help? Thank you.

Update: I used css to resolve this issue, but it would be better if this feature worked out of the box. So it's still a bug and should be resolved. Hope someone will be able to follow up and fix this.

config

Hi @SanIbme
what CSS changes you did to get is working? Please let me know as well as I am not able to load Unordered dot or default in the editor.

Thanks.

Hi @Prashant117,
Below are the styles in my scss file I used with the container id for the editor. I used id instead of class because it works with more specificity. Somehow when I try to use the className in the editor this does not work, so used id instead. Hope this helps!

// two editor containers
#myjoditEditor, #mySecondJoditEditor
{
    // text can start 10 px within the editor
    .jodit-wysiwyg {
        padding-left: 10px;
    }
    // allows default ul and dot to show up 
    ul {
        list-style: inside;
    }
    // allows default ol to show up
    ol {
        list-style: inside;
        list-style-type: number;
    }
    // allows table borders to show up
    td {
        border: solid 1px;
    }
}

Hi @Prashant117, Below are the styles in my scss file I used with the container id for the editor. I used id instead of class because it works with more specificity. Somehow when I try to use the className in the editor this does not work, so used id instead. Hope this helps!

// two editor containers
#myjoditEditor, #mySecondJoditEditor
{
    // text can start 10 px within the editor
    .jodit-wysiwyg {
        padding-left: 10px;
    }
    // allows default ul and dot to show up 
    ul {
        list-style: inside;
    }
    // allows default ol to show up
    ol {
        list-style: inside;
        list-style-type: number;
    }
    // allows table borders to show up
    td {
        border: solid 1px;
    }
}

Thanks @SanIbme,
it worked for me for the time being.