-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Rendering of HTML within <textarea> not working #59
Comments
@hackerwins So does this feature not exist yet? If not then I'm not going to be able to use this :( |
Awesome |
Hi HackerWins, thanks for your work! Is there a way to use the HTML within the textarea? I have tested it and seems to me that it need the htmlentities and not the html tags. I cannot convert the archived html post in my database table, is there a solution? thanks |
@shinesoftware this is PHP example. Check it. Source: https://gist.github.com/soomtong/6635053 |
@hackerwins thanks for the reply! I have already seen it. How to apply it in this case? I am using the css class to select all the textareas.
The content of the database table is for instance
but when I load the page all the html is cleared. thanks |
@shinesoftware use like this $('textarea[name="content"]').html($('#summernote').code()); you could use html() not val() and use this script to put the content for summernote $('#summernote').code('<strong>Works OK!</strong>'); combine this pattern like below <textarea><p>from database</p></textarea> retrive from database. load data to summernote $('#summernote').code($('textarea').text()); sorry for late. cheers! |
Hello and good day |
@shinesoftware when you load from DB (Edit action) you need to put yout content inside htmlspecialchars htmlspecialchars($content); |
thanks |
same code we have configure it perfectly working on the google chrome but it's not working on the mozilla firefox |
Hello, I have successfully integrated summernote but when I enter text in the text area and submit it the text box comes empty... |
please is not work for me.. here is my script tag
and my form
|
I'm using Jquery and Javascript in a MVC web view. I SOLVED the problem doing the following:
|
Thank you |
Hello,
If I attempt to pre-populate a <textarea> that is under the control of summernote, anything that is in HTML format is not rendered correctly.
Only the HTML mark-up is displayed instead of the formatted text.
For example:
<textarea id="summernote">
<strong>this is bold</strong>
</textarea>
When this is passed to summernote, I'd expect to see the text formatted in bold, instead I see:
<strong> this is bold</strong>
if I use:
$('#summernote').code('<strong>this is bold</strong>');
then it works.
Any ideas?
The text was updated successfully, but these errors were encountered: