Ticket #2161 (closed Bug: invalid)

Opened 6 years ago

Last modified 3 years ago

mediawiki 1.10 v4 Have problem with centering in mediawiki.

Reported by: johnp125 Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version: SVN (FCKeditor) - Retired
Keywords: Cc: eric.fortin@…

Description

I have setup the FCKeditor in mediawiki 1.10 v4 and setup the extension in the LocalSettings.php file. I also downloaded the nightly version for mediawiki.

Everytime I try and to a anything with Justify like center left right, it ignores the code when you tell it to save. In other words, in edit mode it looks like it is going to work, but when you hit save it does not put the wiki code to center in it.

Attachments

fckeditor-sandbox.jpg (55.0 KB) - added by johnp125 6 years ago.
fckeditor sandbox

Change History

comment:1 Changed 6 years ago by w.olchawa

  • Priority changed from High to Normal
  • Keywords Pending WorksForMe added; Cannot Center or Left and Right Justify removed
  • Version set to SVN

I use MW 1.12 and 1.11.2 and the latest FCKeditor extension and everything works perfectly to me. Can you reproduce this bug on our sandbox:

http://mediawiki.fckeditor.net/index.php/Sandbox

Would it be a problem for you to upgrade to the newest version of MW?

Changed 6 years ago by johnp125

fckeditor sandbox

comment:2 Changed 6 years ago by johnp125

Thanks for your help.

I cannot reproduce this bug in the sandbox because the sandbox does not have a center button turned on.

http://dev.fckeditor.net/attachment/ticket/2161/fckeditor-sandbox.jpg

I have upgraded to a newer version with the same results.

Installed software

Product Version MediaWiki 1.12.0 PHP 5.0.4 (apache2handler) MySQL 4.1.11

Hooks

Hook name Subscribed by CustomEditor (FCKeditor_MediaWiki, onCustomEditor) EditPage::showEditForm:fields (FCKeditor_MediaWiki, onEditPageShowEditFormFields) EditPage::showEditForm:initial (FCKeditor_MediaWiki, onEditPageShowEditFormInitial) EditPageBeforeConflictDiff (FCKeditor_MediaWiki, onEditPageBeforeConflictDiff) EditPageBeforePreviewText (FCKeditor_MediaWiki, onEditPageBeforePreviewText) EditPagePreviewTextEnd (FCKeditor_MediaWiki, onEditPagePreviewTextEnd) LanguageGetMagic (FCKeditor_MediaWiki, onLanguageGetMagic) MessagesPreLoad (FCKeditor_MediaWiki, onMessagesPreLoad) ParserAfterTidy (FCKeditor_MediaWiki, onParserAfterTidy) ParserBeforeInternalParse (FCKeditor_MediaWiki, onParserBeforeInternalParse) SanitizerAfterFixTagAttributes (FCKeditor_MediaWiki, onSanitizerAfterFixTagAttributes) UserToggles (FCKeditor_MediaWiki, onUserToggles)

comment:3 Changed 6 years ago by johnp125

Just FYI I am running fedora C4

comment:4 Changed 6 years ago by w.olchawa

I can confirm that the text justifying doesn't works, however I can't seem to find this option (formatting text - Left, Right etc.) in the wiki documentation. In my opinion the justify buttons should only apply for objects like images or tables.

Please correct me if I'm wrong. In this case we could definitely confirm this bug.

Thanks

comment:5 Changed 6 years ago by johnp125

Again thanks for looking into this.

For wiki text formatting for centering use

<div style="text-align: center;"> This is the text I am centering on the page. </div>

For wiki text to Left Align use.

<div style="text-align: left; direction: ltr; margin-left: 1em;"> This is the text I am Left Aligning on the page. </div>

For wiki text to Right Align use.

<div style="text-align: right; direction: ltr; margin-right: 1em;"> This is the text I am Right Aligning on the page. </div>

Also you can check out this link here http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_Page_Help/Do-It-Yourself/Formatting_Text#Underlining

comment:6 Changed 6 years ago by w.olchawa

  • Keywords Confirmed added; Pending WorksForMe removed

Thanks for the full explanation. It helped a lot. This bug is definitely confirmed.

comment:7 Changed 6 years ago by johnp125

  • Summary changed from mediawiki 1.10 v4 to mediawiki 1.10 v4 Have problem with centering in mediawiki.

Any Status on this problem?

comment:8 Changed 6 years ago by kenyu73

  • Cc eric.fortin@… added

fckplugin.js - hack/workaround

The issue happens because the text-align command is contained as follows:

<p style="text-align: center">Center Test</p>

In the MediaWiki plugin, it's replacing the <p> tags with a newline (\n) and then causing the childNodes (style='...') to be ignored.

Here is my hack... line 324: replace with this

if ( basicElement && !htmlNode.style.cssText)

line 760: add this to help cleanup the html

stringBuilder.push('\n');

I've just started testing, but it looks ok and indents and aligns now work...

comment:9 Changed 3 years ago by j.swiderski

  • Status changed from confirmed to closed
  • Resolution set to invalid

Since FCKeditor is no longer supported and was replaced with CKEditor, active development of the MediaWiki extension and support for it are also finished.

I’m closing this ticket as it is no longer valid.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy