We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IS: When formatting an element (example: p to h1) all classes on the initial element are lost. SHOULD: keep classes on element change
Suggestion: add a check if config says that classes should be kept and ensure classes are carried over to new element: https://github.com/alohaeditor/Aloha-Editor/blob/dev/src/lib/aloha/jquery.aloha.js#L246
jQuery.fn.zap = function () { if(Aloha.settings && Aloha.settings.plugins && Aloha.settings.plugins.format && Aloha.settings.plugins.format.keepClass) { var elem = this.get(0); var parent = elem ? elem.parentElement : false; if (parent) { var classListWithoutRemoveClass = Array.prototype.slice.call(elem.classList).filter(function (className) { return className !== "preparedForRemoval" }); classListWithoutRemoveClass.forEach(function (item) { parent.classList.add(item); }); } } this.each(function () { jQuery(this.childNodes).insertBefore(this); }).remove(); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
IS:
When formatting an element (example: p to h1) all classes on the initial element are lost.
SHOULD:
keep classes on element change
Suggestion:
add a check if config says that classes should be kept and ensure classes are carried over to new element:
https://github.com/alohaeditor/Aloha-Editor/blob/dev/src/lib/aloha/jquery.aloha.js#L246
The text was updated successfully, but these errors were encountered: