jwysiwyg: Don't clone certain attributes when appending a new paragraph?

117 views Asked by At

When adding a new paragraph by hitting enter in jwysiwyg, the new paragraph automatically has the previous paragraph's attributes assigned to it.

Is there a way to disallow the cloning of certain attributes into newly inserted elements? I looked in the source of jwysiwyg but am not having much luck finding where the elements get cloned.

1

There are 1 answers

0
k00k On BEST ANSWER

I ended up using CKeditor instead. It's definitely bigger, probably more than I need, but it provided some other things we needed for this project as well.

However, I had the same problem in CKeditor. All attributes except id were cloned, including my custom attribute.

In CK, I was able to circumvent this by adding node.removeAttribute( 'myattrib', false ); at line 117 of /ckeditor/_source/core/dom/node.js