Why always get 5 spaces when nothing inside conteneditable div?
I get innerHTML in contenteditable div to a NSString like this:
NSString *htmlText = [self.webView
stringByEvaluatingJavaScriptFromString:@"document.getElementById('content').innerHTML"];
if (htmlText) {
NSLog(@"TEST: |%@"|,htmlText);
}
I wanna check when nothing inside that div but I always get 5spaces when
nothing inside div. Why? Please help!
<div id="content" contenteditable="true" style="font-family: Helvetica">
</div>
No comments:
Post a Comment