-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
se-rtl not set in document created by suneditor #921
Comments
@JiHong88 |
@JiHong88 Maybe I'm using the wrong method to get the output of the editor. |
@JiHong88 hi ?! |
@JiHong88 hi Please Gaide me , tanks |
@Saeeed-B Sorry for the late reply. Getting the content with "getContents" is correct. It will be improved in version 3.0.0. |
@JiHong88 how please example , |
@JiHong88 |
@Saeeed-B Do you want to get content with "rtl" option like below? <div class="se-rtl">
<p>....</p>
</div> |
@JiHong88 If you remember added a button for DIRECTION: I want this button to work exactly in the output document and in fact the output document is rtl |
For the output document to be "rtl", the class of the parent "div" must be "se-rtl". |
@JiHong88 I am now manually (with css style) setting the direction for each document. |
@JiHong88 |
@Saeeed-B |
@JiHong88
|
@JiHong88 |
In short My reason is that if I give div to the class se_rtl, documents that are in English and ltr, will not be displayed correctly. In fact, your editor is not flexible right now, And this is not true, With this Feature , I can write both rtl and ltr documents. @JiHong88 Could I say what I meant? |
Um.. Do you want to output document two versions of "rtl" and "ltr" in one editor? right? |
@JiHong88 no i dont want two version (rtl & ltr) of one document . But I want to change the |
@JiHong88 and i want , this changing , set with this button . @JiHong88 Now this button does not affect the output document. |
@Saeeed-B |
@JiHong88
|
@JiHong88 I am not English language, I think this makes the issue not be clear. |
I am not an English speaker either. :) Is there a problem with getting the rtl content with "getContents"? |
@JiHong88 |
@JiHong88 The vlue that gives the |
@JiHong88 Yes, exactly .
|
@JiHong88 |
I'll fix the "print", "privew" bug. All content in the editor must be in "getContents()" gets the content inside the |
oh No :( @JiHong88 the editor should set |
simple example
|
@JiHong88 the editor should set se-rtl if is rtl mode ,, not me. Because some of the documents may be This is bound by the editor |
Currently: getContents() => what you want: getContents() => do you mean this? |
@JiHong88 |
@JiHong88 Yes, exactly . |
@JiHong88 |
It is not possible to modify this function in the current version, as it is not backward compatible. For now, I'll add a |
Before the "2.42.1" version update, you can use it like this: function save() {
const contents = `<div class="sun-editor-editable ${editorInstance.options.rtl ? "se-rtl" : ""}">${editorInstance.core.getContents()}</div>`;
console.log(contents);
} |
@JiHong88 I am in this few months. Thank you very much for your follow up. |
The 2.43.0 version has been updated. |
@JiHong88 hi
The
se-rtl
class is set in the editor and works well.But there is no editor
output in the content
. And prevents rtl from being applied tothe content display
.This image shows that the
se-rtl
class is applied correctly in the editor :But the image below, which is related to the display of content, clearly shows that the se-rtl class is not set at all.
As a result, the text is displayed correctly in the editor and is from right to left.
But the screen is not right and from left to right.
The text was updated successfully, but these errors were encountered: