Summernote editor saves empty string in databse #2175

Open
eyramP opened this Issue Jan 2, 2017 · 0 comments

Projects

None yet

1 participant

@eyramP
eyramP commented Jan 2, 2017 edited

Hello.
I am integrating summernote in a cms am building with php, but when I enter text into the summernote editor and hit the submit button to save into the database.. it saves nothing, ie empty string in the database.. I first had the issue where it saves the text but when I output to the browser it comes with raw html tags instead of rendered html content.

Please I need your expertise in fixing these issues
below is the source code.
Thank you.

`




Sub Page Title



Sub Page content
<textarea id="summernote" class="summernote" name="content" rows="19" cols="5">
z sub_page_content; ?>
</textarea>
<script type="text/javascript">
$(document).ready(function() {
$('#summernote').summernote({
height: '350px';
});
var postForm = function() {
var content = $('textarea[name="content"]').html($('#summernote').code());
}
});
</script>

		  <button type="submit" name="submit" class="btn btn-default">Submit</button>
		  </div>
		  </div>
		  </fieldset>
	</form>
</div>
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment