I want to add a subview at the top of edit view as the following image ,
so I add a subview and set the scrollview's contentInset. In the ZSSRichTextEditor.m, I add the following code
self.editorView.scrollView.contentInset = UIEdgeInsetsMake(108, 0, 0, 0);.
How should i change the function in the ZSSRichTextEditor.js? Thank you very much.
zss_editor.calculateEditorHeightWithCaretPosition = function() {
var padding = 50;
var c = zss_editor.getCaretYPosition();
var e = document.getElementById('zss_editor_content');
var editor = $('#zss_editor_content');
var offsetY = window.document.body.scrollTop;
var height = zss_editor.contentHeight;
var newPos = window.pageYOffset;
if (c < offsetY) {
newPos = c;
} else if (c > (offsetY + height - padding)) {
var newPos = c - height + padding - 18;
}
window.scrollTo(0, newPos);
}
I want to add a subview at the top of edit view as the following image ,
so I add a subview and set the scrollview's contentInset. In the
ZSSRichTextEditor.m
, I add the following codeself.editorView.scrollView.contentInset = UIEdgeInsetsMake(108, 0, 0, 0);
. How should i change the function in theZSSRichTextEditor.js
? Thank you very much.