Skip to content

Commit 63f8286

Browse files
authored
Merge pull request #118 from jyeakley/release_1.6.0
Added support for pasteHTML within the Rich Editor.
2 parents e9d92ae + e3e11a9 commit 63f8286

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/main/java/gwt/material/design/addins/client/richeditor/MaterialRichEditor.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,25 @@ protected native void insertText(Element e, String text) /*-{
163163
});
164164
}-*/;
165165

166+
/**
167+
* Insert custom HTML inside the note zone
168+
* @param html
169+
*/
170+
public void pasteHTML(String html) {
171+
pasteHTML(getElement(), html);
172+
}
173+
174+
/**
175+
* Insert custom HTML inside the note zone with JSNI function
176+
* @param e
177+
* @param html
178+
*/
179+
protected native void pasteHTML(Element e, String html) /*-{
180+
$wnd.jQuery(document).ready(function () {
181+
$wnd.jQuery(e).materialnote('pasteHTML', html);
182+
});
183+
}-*/;
184+
166185
@Override
167186
public void clear() {
168187
clear(getElement());

0 commit comments

Comments
 (0)