switch formater via url

Questionsswitch formater via url
Mario asked 8 years ago


I like to switch via URL between the editors via URL
I know already:

$col["hidden"] = (isset($_GET["pzn_ch"])?true:false);

The following does not work:
$col["formatter"] = (isset($_GET["wysiwyg"])?true:false);

Is there someting like a bool-function possible between. wysiwyg|nowysiwyg?

best regards

4 Answers
selectcase.biz answered 8 years ago

I mean I know already:

$col["hidden"] = (isset($_GET["wysiwyg"])?true:false);

Abu Ghufran answered 8 years ago

You can conditionally enable html editor by this code:

if (isset($_GET["wysiwyg"]))
$col["formatter"] = "wysiwyg";

Please reply if you mean something different.

selectcase.biz answered 8 years ago

The principle is right. I implemented it like:
http://www.site.com/filename.php?wysiwyg=1 – to turn on
http://www.site.com/filename.php?wysiwyg=0 – to turn off

$col = array();
$col["title"] = "Editor";
$col["name"] = "editor";

if (isset($_GET["wysiwyg"]))
$col["formatter"] = "wysiwyg";

$col["edittype"] = "textarea";
$col["editable"] = true;
$cols[] = $col;


Or this line in the head:

if (isset($_GET["wysiwyg"]))


May you help, to have the whole picture, please?

selectcase.biz answered 8 years ago

Test works: The switcher works in one direction.
If I want to switch off, how do I do it`?
I integrated it this way:

if (isset($_GET["wysiwyg"])) $col["formatter"] = "wysiwyg";
if (!isset($_GET["wysiwyg"])) $col["formatter"] = "textarea";

Your Answer

8 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?