jodit / jodit-angular

Angular wrapper for Jodit && Hey. Due to the fact that I do not use Angular in my projects, I cannot fix plugin errors in a timely manner. If you want the plugin to develop, send PR or better become a contributor
MIT License
48 stars 35 forks source link

Some options are being ignored by the Editor #54

Closed dtodt closed 4 years ago

dtodt commented 4 years ago

Angular: ~8.2.14 Jodit: ^3.3.24 Angular Jodit: ^1.0.99

I'm trying to disable some features but, it's not working.

These are the options I'm trying to disable:

    cleanWhitespace: false,
    removeEmptyBlocks: false,
    removeEmptyNodes: false,

Apparently, this should be working, but the editor keeps removing my empty tags. Is there any other feature that I need to disable or enable?

Here's my actual configuration:

  public editorModel = {
    askBeforePasteHTML: false,
    beautyHTML: false,
    buttons: [
      'fullsize',
      'undo',
      'redo',
      'about',
    ],
    defaultMode: '1',
    dialog: {
      resizable: false,
      draggable: false,
    },
    disablePlugins: 'placeholder',
    cleanHTML: {
      replaceNBSP: false,
    },
    cleanWhitespace: false,
    codeMirror: false,
    enableDragAndDropFileToEditor: false,
    removeEmptyBlocks: false,
    removeEmptyNodes: false,
    showCharsCounter: false,
    showWordsCounter: false,
    showXPathInStatusbar: false,
    spellcheck: false,
    toolbarButtonSize: 'large',
    uploader: {
      insertImageAsBase64URI: true,
    },
  };

Update: I'm trying to use jodit as a document editor, and sometimes we need some spaces and such.

dtodt commented 4 years ago

My bad, I guess it's working as expected, when I add a new line the editor put some space inside the tag, preventing it from being removed.

My problem was with my start model, that had some empty tags in it.