Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2014-02-08 10:51:28

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 63
Website

Re: [howto] A fullscreen editor for write your article body

When searching for a plugin that would highlight all tags in an article I stumbled over this one.

I installed it and like it very much.
Only thing is, it does not highlight textile or any other html tags.

I also did not find any other plugin that would do that. There are a couple of Editors/Plugins that would give me something like a code editor with highlighting for forms,pages and styles but I would like to have the tags highlighted in the article textarea.

I guess that would be very convenient for my clients. Because like that it would be fool proof. I could just say… “you can edit everything – just do not touch the little red parts” for example.

So has anybody an idea on how to achieve that or am I missing something on that ace-editor-plugin that will highlight tags or textile automatically as you wrote?
Any help here would be great. I am really wondering if I did not search enough or if the need for that is not shared by anybody else. I think for the non-geek-user (client) of the backend it would be a really helpful thing. Especially when using Stefs amazing smd_macro plugin as a container it would be cool if the macros are highlighted red for example.

Last edited by demoncleaner (2014-02-08 10:53:08)

Offline

#12 2014-02-08 21:01:05

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 471
Website

Re: [howto] A fullscreen editor for write your article body

demoncleaner wrote #278713:

I installed it and like it very much.

Thanks

Only thing is, it does not highlight textile or any other html tags.

The editor provides syntax highlighting for textile. I use it but it is really flawed. he only highlight block tag, and unlike hightlight for markdown, xml syntax are not highlight in same time.

If you want highlight xml syntax :

In ace-for-write-tab.js file, change line 29

editor.getSession().setMode("ace/mode/textile");

by

editor.getSession().setMode("ace/mode/xml");

And for the moment, my color mode doesn’t support xml. you need change color mode

replace line 35

editor.setTheme("ace/theme/sacripant");

by

editor.setTheme("ace/theme/tomorrow_night_eighties");

you can test differents color modes in Ace kitchen Sink

Offline

#13 2014-02-09 11:33:26

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 63
Website

Re: [howto] A fullscreen editor for write your article body

Thanks for the quick answer. I am confused. The editor does not “color” anything in my case right now. Textile highlighting is exactly what I would want. What do you mean by “only highlight block tags”. What I would like to achive is … that in case I have inside of an article a macro… for example

<txp:mymacro name=“aname” id=“1”>
Content of the macro container
</txp:mymacro>

That first and third line are colored to make the user understand that he should better not touch the colored part.
Or more simple example… that if I have an inline image like <txp:image id=“1” /> in some text, that the user sees directly that there are some “<” that he better should not touch to not blow of the whole site.

Offline

#14 2014-02-10 19:09:50

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 471
Website

Re: [howto] A fullscreen editor for write your article body

Perhaps you confuse the textile syntax with textpattern syntax?

for Textile syntax see here

 h1. My Level 1 Title

 p(my class). My paragraph with *this text in strong emphasis*

In this editor, by default h1. and p(my class). are highlighting (blocks elements), but * for strong element is not highlight.

In your exemple, you write about Textpattern syntax. Textpattern syntax is based on xml syntax.
If you want activated xml syntaxe in Ace Editor, make modification I asked before.

Last edited by sacripant (2014-02-10 19:11:16)

Offline

#15 2014-02-10 19:12:20

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 63
Website

Re: [howto] A fullscreen editor for write your article body

Ahhhh. My fault. Sounds like the solution of my problems. Just mixed textile/textpattern indeed. Thanks a lot. I will give it a try in a moment. =)

Offline

#16 2014-02-25 02:31:47

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,392
Website

Re: [howto] A fullscreen editor for write your article body

Thanks to sacripant for posting his tutorial over on TXP Tips – Distraction free writing environment for Textpattern.

Offline

#17 2018-10-27 12:30:00

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,014
Website

Re: [howto] A fullscreen editor for write your article body

jstubbs wrote #279209:

Thanks to sacripant for posting his tutorial over on TXP Tips – Distraction free writing environment for Textpattern.

Re-discovering this again from that tips link. ;)

I still write my long-form outside of Txp first, and now that I’m going to include ePubs in my publishing offer, that will always be the case for long-form.

But I did notice in the to-dos of the tips write-up, Thomas, that you hoped to make a plugin out of this… Still the plan? I think it’s a good idea.


The text persuades, the *notes prove。

Offline

#18 2018-10-27 15:48:17

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 471
Website

Re: [howto] A fullscreen editor for write your article body

Hi Destry,

Since 2013, I wrote a big update last year :
tom_write_editor: a editor for geek writers
github.com/Sacripant/tom_write_editor/releases

It’s now a textpattern plugin.

I use it on my personal website. Still under Txp 4.6. I’m happy with him.
Not yet tested with Txp 4.7.
If you want to test and propose improvements, don’t hesitate.

Offline

Board footer

Powered by FluxBB