-
-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
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
Problems with custom formats #190
Comments
rsvitak
changed the title
Switching custom formats doesn't replace CSS class names.
Problems with custom formats
Jan 20, 2020
Hi, @rsvitak
I'll notify you when the edit is complete and the version is updated. |
Thank you very much sir! |
JiHong88
added a commit
that referenced
this issue
Feb 11, 2020
JiHong88
added a commit
that referenced
this issue
Feb 12, 2020
add: util-isFreeFormatElement, getFreeFormatElement #190
The 2.26.0 version has been updated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using this custom configuration of formats:
formats: [ { tag: 'p', // Tag name name: 'NORMAL', // default: tag name command: 'replace', // default: "replace" 'class': '__se__format__NORMAL', // Class names must always begin with "__se__format__" }, { tag: 'div', // Tag name name: 'CODE', // default: tag name command: 'replace', // default: "replace" 'class': '__se__format__CODE', // Class names must always begin with "__se__format__" } ],
When run suneditor with this configuration I have 2 issues (maybe rather requirements?):
in main menu (balloon style) the name of the current format is not NORMAL or CODE, but just P or DIV. The NORMAL and CODE is only displayed in the submenu. This is quite confusing, can it be configured somehow?
Switching between formats works well, P element is switched to DIV and viceversa. But the value of class attribute is rather strange: First adjusting to CODE is ok. But after changing the format from CODE to NORMAL it becomes: "__se__format__NORMAL __se__format__CODE", after changing back to NORMAL it becomes: "__se__format__CODE __se__format__NORMAL".
But generally it works well. I wish the default P and PRE formats could work the same in SunEditor. The only reason is that I would like to have as simple HTML documents as possible consisting of just simple P, PRE, BR (etc.) elements if possible. The additional HTML attributes are not needed.
The text was updated successfully, but these errors were encountered: