jodit / jodit-react

React wrapper for Jodit
MIT License
347 stars 117 forks source link

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

Open SanIbme opened 9 months ago

SanIbme commented 9 months ago

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:

During Edit:

image

After Edit: image

SanIbme commented 8 months ago

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.

SanIbme commented 8 months ago

Hello Jodit Team and Community, I noticed there was an issue https://github.com/xdan/jodit/issues/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.

SanIbme commented 8 months ago

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.

Prashant117 commented 8 months ago
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.

SanIbme commented 8 months ago

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;
    }
}
Prashant117 commented 8 months ago

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.

ramespra commented 5 months ago

This is still an ongoing bug

manohar-geekologix commented 5 months ago

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

Rogerio234 commented 3 months ago

Thank you very much! There were many days looking for a solution to this problem.

ananty1 commented 1 month ago

Can you please help,how you integrated that into the editor?