Comments/Ratings for a Single Item
This time, the option to use HTML has been set to true in a hidden field. This is a test to tell if it works.
I have added the Codemirror plugin to CKEditor, so that when you click on Source, the HTML code is syntax highlighted.
For some unknown reason, CKEditor is not even working today. It was working last night, and the only change I made to the config file today I immediately commented out after I saw it not working, but it didn't help. Since I can't do anything with CKEditor right now, I am trying out alternatives. I am writing this in TinyMCE, which is the editor used by Wordperfect, though what I have here so far doesn't look like the editor in Wordperfect.
I got CKEditor working again by installing the latest version. Since I haven't been very pleased with TinyMCE, I'll see what I can do with CKEditor.
Re-editing.
It looks like the problem was actually something in my config file. After I changed it back, I neglected to refresh the page and flush the cache. Since this is JavaScript, I need to do that to see changes.
I have just gotten this to open in Source mode instead of WYSIWIG mode. I will enter a FIGURE tag as a test, since that got wiped from some of my HTML yesterday.
King
As long as I viewed this as Source, it did not change my HTML, but once I switched to WYSIWIG and then switched back to Source, it removed the FIGURE and FIGCAPTION tags, putting a P tag around the image and another around the caption. So, having the editor open in Source is part of the solution. You should be able to safely use HTML without it changing so long as you avoid using the WYSIWIG mode.
As another test, I am adding another FIGURE tag. This time I have added a new line to the configuration file to allow all content. Let's see if that helps.
This time, when I switched to WYSIWIG and back, it changed my uppercase HTML to lowercase XHTML and added some line breaks, but it otherwise left my HTML alone.
Lastly, I edited it to close tags with just a greater than sign, and not to add a slash before the greater than sign. Now I should configure individual pages, so that it opens in WYSIWIG for new comments and in Source for editing content or for posting pages.
One more test. Here is the same figure code with the piece class added.
Â
While it left the class intact, this class needs to be followed by
, and it changed that to
,then later got rid of the , which did not do the job of
. So I need to find a way to preserve that.
I have just modified usermodifycomment.php to use prepared PDO statements and to no longer transform the comment in any way. It was this script that was converting angle brackets to HTML entities and back, so that the source code showed in the comment. I will test it by editing this message.
Testing.
Lost HTML entity while posting original message. Try again. A
looks like this.
Lost HTML entity while posting original message. Try again. A
looks like this.
I have been losing the HTML entities when posting. A <BR> looks like this.
HTML entities can be preserved when the script replaces each & with an & before printing the comment to a textarea.
If I want & to appear in the text, I should write it as &amp;.
The createsubject.php script now opens in wysiwyg mode.
You have the option of not using WYSIWYG. Although it is used by default for new comments, you can write HTML source by clicking the Source button in the editor. This will use Codemirror to provide you with syntax-highlighted HTML editing. For editing comments and for writing content for the site, I am leaving Source as the default. So, as long as you don't switch to WYSIWYG mode, having it available should have no effect on what you write. If it's not working in your browser, then I expect you're not seing CKEditor or the Codemirror plugin, and that may be due to JavaScript not working in your browser or for this site. In that case, you'll just get an ordinary textarea.
I am having issues with HTML entities produced by the WYSIWYG editor. Here's a sentence with an ordinary apostrophe in it.
I need to find a way to distinguish between output from the WYSIWYG editor and output from the code editor, so that & gets changed to &amp; only for code. For reference, I'm writing this with the WYSIWYG editor.
ä isn't here. This is what a <p> tag looks like.
Ù isn't an ASCII character. This is what a <p> tag looks like.
ä isn't an ASCII character. This is what a <p> tag looks like. Written as HTML.
The problem I was having with too many &'s being added was duplicate code doing the same thing twice. I originally coded in a line for replacing the &'s in a string with &'s, and deprecated the display_comment() and format_comment() functions, then later decided to repurpose them. The former handles shortcodes now, and the latter converts &'s to &'s to preserve HTML entities. This comment should appear without problems if this problem is fixed for posting subject comments.
24 comments displayed
Permalink to the exact comments currently displayed.
I'm starting to add CKEditor support to the comments, beginning with the createsubject.php script. This line is in bold. This line is in italics.
This line is struck out.With this editor, I think I should set "Using HTML tags in the message" to true automatically.