1

Topic: markItUp! simple Html filter plus a little extra

For Wolf 0.7.x

adds a markItUp! html toolbar to your Pages and Snippets textareas and a Wolf specific set of buttons.

Toolbar

For this or any of the other filter plugins toolbars to get loaded in Wolf 0.7.3 you'll need to make a little modification to the snippet's view edit.php file, so go check this commit.

link updated: WolfHtml!

p.s: Loading the toolbar for Layout editing was removed, if you think it should be included, please reply in this topic.
--------------------------------------------------------------------------------------------------------

Any input on code snippets that you think should be included, please post it here.

Some tips:

If you hold the AltKey and while pressed click on some of the buttons, you'll get different results. (at least in Windows)

For example, the B button (bold):

default: <strong></strong>
with ALT: <em></em>

Some of the Php buttons:

default: <?php $this->author() ; ?>
with ALT: $this->author();

Like I said, there should be a few improvements and additions for the first oficial release, but feel free to request or suggest code snippets.

p.s2: this post is a mess, sorry.

Last edited by andrewmman (2011-09-07 10:01)

Thumbs up

2

Re: markItUp! simple Html filter plus a little extra

Excellent Job, man!
This plugin is really a time-saver.
Good idea and congrats

Thumbs up

3

Re: markItUp! simple Html filter plus a little extra

Nice one andrewmman! smile

Seems like the decision to use MarkItUp is paying of already.

(you can add it to the repository yourself now... the only thing you can't do yourself yet(!) is add a new release)

Edit: you may want to review this document concerning roles and permissions in 0.7.x

Last edited by mvdkleijn (2011-01-28 11:52)

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

4

Re: markItUp! simple Html filter plus a little extra

This isn't an official release yet so I won't add it to the repository yet. I would like to test a few more things, check some compatibility issues and maybe add a few more buttons/functions.

Martijn, thanks for pointing that out. I'll check the Users permissions documentation.

Now the editor role has a toolbar with html buttons only (plus fullScreen and clean html tags). Administrator and developer role, the full set (php and Wolf functions).

Last edited by andrewmman (2011-01-28 16:55)

Thumbs up

5

Re: markItUp! simple Html filter plus a little extra

I really like the simplicity of this filter, this is what I needed mainly because most of my editors will only be editing in solely HTML.
However, is it at all possible to make it so that it restricts PHP entirely (like it will ignore it) if a non-administrator puts it into the textarea. If not, is it possible to block PHP all together? (Similar to the textile filter? I was going to use that because it allows HTML code to be intermingled, but I saw this and it was much more appealing because its focus is on HTML editing.)

Currently with where my site is going to be, the higher up administrators do not feel that it would be best to allow backend users the ability to access PHP on their pages.

Thumbs up

6

Re: markItUp! simple Html filter plus a little extra

Miz wrote:

However, is it at all possible to make it so that it restricts PHP entirely (like it will ignore it) if a non-administrator puts it into the textarea. If not, is it possible to block PHP all together? ...

It might be overkill, but the Wolftags plugin can do this for you. Have a look at the documentation and see what you think.

Also, I'm not sure but there might be a way for the bundled Kses.php helper to strip out PHP?

Using Wolf CMS professionally and for profit? Please consider supporting Wolf financially. Thanks!

7

Re: markItUp! simple Html filter plus a little extra

(Little bit off topic) @Miz - It used not to be possible because it was difficult to make a low-level difference between permissions. This has been solved in newer release which means it'll be easier for plugin / filter devs to check what permissions a user has and do extra filtering on PHP based on those permissions. In any case allowing a user to use (or not use) certain filters is also on the drawing board.

On topic: I do hope andrewmman will release this plugin soon... I saw the initial versions of it and quite liked it.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

8

Re: markItUp! simple Html filter plus a little extra

@mvdkleijin, yes sorry I see now that it was slightly off topic of me to ask. Thanks for responding so quickly however - David & mvdkleijin

Fortunately for my situation, andrewmman made this plugin so clean and efficient (especially his source code) that I found an easy way of editing the PHP out for my users. (Well I more replaced the <? to its &lt; equivalent but nevertheless my problem is solved in less then a line or two of code!)

So thanks Andrewmman, kudos for your filter it works like a charm. As mvdkleijin said I really hope the next version is added to the Plugin Repository this thing can surely help some of us more rookie-like members.

It would be wonderful if this was one day bundled to the Core like Markdown or Textile is. Keep it up. big_smile

Last edited by Miz (2011-04-05 21:57)

Thumbs up

9

Re: markItUp! simple Html filter plus a little extra

Link and plugin updated, the update url is now enabled so next update you'll get a message directly in your Wolf installation.

Miz: The html toolbar is part of markItUp! default, I just changed the icons and added the extras.

Let's give this version a try and if everything is ok, I'll add it to the repo. So please post any issues here.

Thumbs up

10

Re: markItUp! simple Html filter plus a little extra

Martijn or David, the plugin has been added to the repo, could you add the new release?

Thanks.

Thumbs up

11

Re: markItUp! simple Html filter plus a little extra

Done!

Tutorials at Project 79 | Wolf CMS Docs

12

Re: markItUp! simple Html filter plus a little extra

Thanks, jackie.

Thumbs up

13

Re: markItUp! simple Html filter plus a little extra

Andrewmman: great work, excellent plugin, I will use it in all my sites.

I would love to have this plugin combined with syntax highlight. Many times I need to copy/paste my code to Notepad++ for editing purposes - it is much easier with syntax highlite.

Also, I did not know that it is able to rok with Alt, before I read this post.

--
Piotr