Check out Symmetric Chess, our featured variant for March, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Earlier Reverse Order Later
CKEditor support[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Thu, May 19, 2016 11:49 PM UTC:

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.


🕸Fergus Duniho wrote on Thu, May 19, 2016 11:53 PM UTC:

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.


🕸Fergus Duniho wrote on Fri, May 20, 2016 12:31 AM UTC:

I have added the Codemirror plugin to CKEditor, so that when you click on Source, the HTML code is syntax highlighted.


🕸Fergus Duniho wrote on Tue, May 24, 2016 02:27 AM UTC:
<p>There is a very big issue with using CKEditor. This is a WYSIWIG editor that CHANGES HTML. That's VERY BAD. I'm going to have to change how it is implemented. We have been checking whether a page uses HTML. So, I should make CKEditor available only if that is unchecked. I may also change it to say something like "Strictly in HTML" or change it to radio buttons for WYSIWIG or Strictly HTML. I may look into using a code editor, maybe Codemirror, for code written in HTML.  It's too late to work on this tonight, but it may be a project to work on tomorrow.</p>

🕸Fergus Duniho wrote on Tue, May 24, 2016 02:59 PM UTC:

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.


🕸Fergus Duniho wrote on Tue, May 24, 2016 03:57 PM UTC:

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.


🕸Fergus Duniho wrote on Tue, May 24, 2016 04:08 PM UTC:

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.

Queen

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.

Queen

 

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.


🕸Fergus Duniho wrote on Tue, May 24, 2016 06:01 PM UTC:
<p>Displaying everything as HTML code is undesirable, but it's time for lunch.</p>

🕸Fergus Duniho wrote on Tue, May 24, 2016 06:52 PM UTC:
<p>New message.</p>

🕸Fergus Duniho wrote on Tue, May 24, 2016 08:05 PM UTC:

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.


🕸Fergus Duniho wrote on Tue, May 24, 2016 08:23 PM UTC:

Losing HTML entities. A
looks like this.


🕸Fergus Duniho wrote on Tue, May 24, 2016 08:26 PM UTC:

Lost HTML entity while posting original message. Try again. A
looks like this.


🕸Fergus Duniho wrote on Tue, May 24, 2016 10:52 PM UTC:

Lost HTML entity while posting original message. Try again. A
looks like this.


🕸Fergus Duniho wrote on Wed, May 25, 2016 02:26 AM UTC:

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 &amp; to appear in the text, I should write it as &amp;amp;.


🕸Fergus Duniho wrote on Wed, May 25, 2016 03:08 AM UTC:

The createsubject.php script now opens in wysiwyg mode.


(zzo38) A. Black wrote on Wed, May 25, 2016 04:29 PM UTC:
I really hate WYSIWYG. Fortunately, the WYSIWYG does not work on my computer.

🕸Fergus Duniho wrote on Wed, May 25, 2016 04:46 PM UTC:

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.


🕸Fergus Duniho wrote on Thu, May 26, 2016 01:13 AM UTC:

I am having issues with HTML entities produced by the WYSIWYG editor. Here&#39;s a sentence with an ordinary apostrophe in it.


🕸Fergus Duniho wrote on Thu, May 26, 2016 01:15 AM UTC:

I need to find a way to distinguish between output from the WYSIWYG editor and output from the code editor, so that &amp; gets changed to &amp;amp; only for code. For reference, I&#39;m writing this with the WYSIWYG editor.


🕸Fergus Duniho wrote on Thu, May 26, 2016 01:18 AM UTC:

&auml; isn&#39;t here. This is what a &lt;p&gt; tag looks like.


🕸Fergus Duniho wrote on Thu, May 26, 2016 01:20 AM UTC:
&auml; isn't an ASCII character. This is what a &lt;p&gt; looks like. Written as HTML.

🕸Fergus Duniho wrote on Thu, May 26, 2016 01:25 AM UTC:

Ù isn't an ASCII character. This is what a <p> tag looks like.


🕸Fergus Duniho wrote on Thu, May 26, 2016 01:26 AM UTC:

ä isn't an ASCII character. This is what a <p> tag looks like. Written as HTML.


🕸Fergus Duniho wrote on Thu, May 26, 2016 01:37 AM UTC:

The problem I was having with too many &amp;'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 &amp'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 &amp;'s to preserve HTML entities. This comment should appear without problems if this problem is fixed for posting subject comments.


24 comments displayed

Earlier Reverse Order Later

Permalink to the exact comments currently displayed.