Opened 6 years ago

Closed 6 years ago

#1963 closed improve feature (fixed)

TinyMCE configurations: possibility to disable WYSIWYGIEWC

Reported by: mahouni Owned by: shevek
Priority: major Milestone: 1.6
Component: BW Forum Keywords:
Cc:

Description

you need to add following line below the texarea in /build/forums/templates/editcreateform.php (line 131)

<a href="javascript:;" onclick="tinymce.execCommand('mceToggleEditor',false,'topic_text');"><?php echo $words->getFormatted("forum_toggleTinyMCE"); ?></a>

While the switch works fine the text entered into the simple textarea isn't saved into the database. Maybe implement it with a preference for allowing a continuously setting.

Change History (21)

comment:1 Changed 6 years ago by shevek

Added the switch; worked for me. Please test locally (forum and blog):

https://gitorious.org/bewelcome/rox/commit/ea72987f4490ba7386ece14d16c07da8886164d9

comment:2 Changed 6 years ago by shevek

  • Milestone changed from unassigned to 1.6
  • Owner set to shevek
  • Status changed from new to assigned

comment:3 Changed 6 years ago by shevek

  • Status changed from assigned to local_testing

comment:4 Changed 6 years ago by crumbking

Doesn't work in the forum. Text is not saved.

comment:5 Changed 6 years ago by shevek

Strange. Works here with version 25.0.1364.172 m on Windows 8 AND IE 10 as well.

comment:6 Changed 6 years ago by shevek

Found why it's not working. Added a preference (see #1880).

Commit: https://gitorious.org/bewelcome/rox/commit/759da8f5451bb2531af351488bdcdde9446df939

comment:7 Changed 6 years ago by crumbking

Seems to be saved now. And the pref. solution is better than the ugly toggle link ;-)

While disabled the text marker starts not in the beginning of the textarea but kind of indented. But just in the first line. Firefox 19/ubuntu

comment:8 follow-up: Changed 6 years ago by shevek

I saw that intendation as well (Chrome 25), but I guess that's were you clicked into the text area.

comment:9 Changed 6 years ago by toub

When I enable it, I get the following error in the "new topic" page (testing on debian/firefox).

ReferenceError?: tinyMCE is not defined http://rox.bewelcome.local/groups/71/forum/new Line 205

comment:10 Changed 6 years ago by toub

The bug occures while configuring tinyMCE in the javascript code in tinymceconfig.js

Where is defined tinyMCE, and how is the file included?

comment:11 Changed 6 years ago by toub

Looks like a bug in main.js

  {
    file: "tiny_mce/tiny_mce.js",
    pages: [
      "blog",
      "forums",
      "trip"
    ]
  },

If I add "group" it works.

comment:12 Changed 6 years ago by toub

  • Status changed from local_testing to needs_work

comment:13 Changed 6 years ago by shevek

So, group was always missing from that list but as I removed the include for tiny_mce.js from editcreateform.php it get visible.

Thanks for testing and to let me know how to fix it: http://www.gitorious.org/bewelcome/rox/commit/ad860b2058675946239a015ca1e2a59a9ada3232

comment:14 Changed 6 years ago by shevek

  • Status changed from needs_work to to_alpha

comment:15 Changed 6 years ago by shevek

  • Status changed from to_alpha to testing

comment:16 in reply to: ↑ 8 ; follow-up: Changed 6 years ago by crumbking

Replying to shevek:

I saw that intendation as well (Chrome 25), but I guess that's were you clicked into the text area.

Seems to be still an issue on alpha with IE8. I still see the intendation on alpha. If you edit a post it shows up again. But it does not seems to be saved in the DB. Is there some hidden stuff in the code?

comment:17 Changed 6 years ago by shevek

I check the code maybe there are some white spaces that need to be cleaned now that the text area is used when no TinyMCE is in place.

comment:18 Changed 6 years ago by midsch

The TinyMCE isn't visible anymore in Firefox 19.0.2 and Chromium on Ubuntu, after setting the according preference. But I don't have a mobile device for testing.

comment:19 Changed 6 years ago by shevek

As no code is called on the device to disable it but different HTML/JS is send to the device it is same to assume that the editor would be disabled on a mobile device as well.

comment:20 in reply to: ↑ 16 Changed 6 years ago by shevek

Seems to be still an issue on alpha with IE8. I still see the intendation on alpha. If you edit a post it shows up again. But it does not seems to be saved in the DB. Is there some hidden stuff in the code?

The indent was due to a line break in the code. So an empty text area would have 8 spaces in it.

Removed: https://www.gitorious.org/bewelcome/rox/commit/752eb665d9105b48d92b3007cb1431f9a91aaf2e

comment:21 Changed 6 years ago by crumbking

  • Resolution set to fixed
  • Status changed from testing to closed

Okay works now. Intendation is gone. Mark that one as fixed.

Note: See TracTickets for help on using tickets.