The system has a page, users need to fill in the text information, I put Baidu editor embedded in, but do not know how to get the content to write, and then submit. Generate PHP files.
Now I do not know how this editor is submitted by the form, itself this does not take a form, checked the information did not get out.
Thank you
Two questions,
1. How to get the content that the editor fills in.
2. The editor fills in the content to generate the PHP file
Reply to discussion (solution)
Add the Name property directly to the editor's textarea or script tag, just like normal textarea
This is my previous, not very will add, consult, thank you
ID Myeditor Why do you have 2, remove the div?
You can see the script var_dump ($_post) after submission.
Out, if you want to get the editor of the source code (HTML source), how to deal with AH? Thank you
In order to later generate the HTML source PHP file
$_post[' Myeditor ' is the HTML code in the editor.
$_post[' Myeditor ' is the HTML code in the editor.
No, it is written in plain text. Text similar to form submission
Baidu Editor itself has a
Editor.getcontent () This function, which can be obtained, but does not know which block to add it to now
What, you text box of name= "Myeditor", backstage use this to get AH
$this->input->post (' myeditor '));
Above can be obtained, but not source code
I want to get
Content of XX written
Tagged source code
Above can be obtained, but not source code
I want to get
Content of XX written
Tagged source code
I turned the previous write, it is really just use this can get HTML source code.
You are not submitting the string is filtered
Above can be obtained, but not source code
I want to get
Content of XX written
Tagged source code
What you get is content with HTML tags!
Only if you echo it, what you see on the browser is the formatted content. Because HTML is always interpreted by the browser
You can view the source code or output with a pre-formatted label
This backstage template looks good.
Add pre-formatted labels when outputting
Is there a function that can directly output HTML tags together? I remember one of those.
Public Function content () {
$content = $_post[' myeditor ');;
echo "--------------------------". "
";
echo Htmlspecialchars ($content);
Echo $content;
}