Skip to content
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

Append text into cursor position #138

Closed
Luiz-Otavio-Dorigon opened this issue Oct 31, 2017 · 3 comments
Closed

Append text into cursor position #138

Luiz-Otavio-Dorigon opened this issue Oct 31, 2017 · 3 comments

Comments

@Luiz-Otavio-Dorigon
Copy link

Would it be possible to add text at the cursor position?

For example, adding a button that clicks adds standard text.

@330939204
Copy link

330939204 commented Nov 9, 2017

use the js funtion insertHtml

create a class that extends the RichEditor

add method

public void insertHtml(String content) {
exec("javascript:RE.prepareInsert();");
exec("javascript:RE.insertHTML('" + content + "');");
}

@Luiz-Otavio-Dorigon
Copy link
Author

Thank you, it worked perfectly.

@OnlyMyRailgun
Copy link

OnlyMyRailgun commented Dec 5, 2017

@330939204 Thank you for your excellent resolving. But I still have a problem, when I call insertHtml("abc"), it worked perfectly. But if I call insertHtml("
"), it didn't work. Would you give me some help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants