Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1117 2013-06-10 15:41:32

alivato
Member
Registered: 2011-03-31
Posts: 151

Re: hak_tinymce WYSIWYG article editor

(( I do not understand where it is necessary paste

tinymce.init({
    ...
    style_formats : [
        {title : 'Bold text', inline : 'b'},
        {title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
        {title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
        {title : 'Example 1', inline : 'span', classes : 'example1'},
        {title : 'Example 2', inline : 'span', classes : 'example2'},
        {title : 'Table styles'},
        {title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
    ]
});

Offline

#1118 2013-06-10 15:46:05

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

Put it in the initialization box in the settings. Add it to what’s already there.


Shoving is the answer – pusher robot

Offline

#1119 2013-06-10 15:51:12

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: hak_tinymce WYSIWYG article editor

hi hak,

any interestingin bumping this bad-boy for tinyMCE v4?

Offline

#1120 2013-06-10 16:03:24

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

Have you tried it with v4 by any chance? Any issues?


Shoving is the answer – pusher robot

Offline

#1121 2013-06-10 16:43:00

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

@alivato: I accidentally gave you links to the Version 4 configuration options, these are the 3.x ones.


Shoving is the answer – pusher robot

Offline

#1122 2013-06-10 16:45:05

alivato
Member
Registered: 2011-03-31
Posts: 151

Re: hak_tinymce WYSIWYG article editor

hakjoon wrote:

Put it in the initialization box in the settings. Add it to what’s already there.

Where are these settings: in the admin panel or in some file?

Offline

#1123 2013-06-10 17:19:17

alivato
Member
Registered: 2011-03-31
Posts: 151

Re: hak_tinymce WYSIWYG article editor

I need to become so

But I do not understand what it needs to do.

Last edited by alivato (2013-06-10 17:23:28)

Offline

#1124 2013-06-10 18:08:49

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

It goes in the Admin. I’m confused as to what the right setting is now because we use style_format with 3.x and everything works. This is what we have.

style_formats: [
		{title :'Paragraph', block: 'p'},
		{title :'Subhead', block: 'h2'},
		{title :'Sub-subhead', block: 'h3'},
		{title :'Credit / Caption', block:'p', classes: 'caption'}
	],

You might want to look into content_css to make it look like what you want.


Shoving is the answer – pusher robot

Offline

#1125 2013-07-16 23:52:46

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: hak_tinymce WYSIWYG article editor

I just tried to use TinyMCE 4 with this plugin. Thought I was going to get it to work after changing some paths and getting rid of all the code related to the compressor, etc. However, version 4 sets the visibility to hidden for <textarea id=“body” …> and creates lots of new divs for the editor that include style prefixes like “mce_12- body” Definitely over my head, but seems pretty clear it isn’t playing nice with the TXP write tab/page. Going back to TinyMCE version 3.x with hak_tinymce.

TinyMCE 4 does seem to work fine when the selector is used on textareas that aren’t on the Write page in the Admin area: http://www.photonomad.com/images/hak_tinymce_test.png

Last edited by photonomad (2013-07-17 00:00:05)

Offline

#1126 2013-07-17 00:08:16

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_tinymce WYSIWYG article editor

I haven’t had a chance to see what will be needed to get v4 integrated yet.

I’ll try to take a look soon.


Shoving is the answer – pusher robot

Offline

#1127 2013-07-25 18:40:49

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: hak_tinymce WYSIWYG article editor

@hakjoon: Thanks!

FYI/Update:

When TinyMCE 4 is manually installed (no hak_tinymce), it works fine on the write page. I just tested it by turning off Textile in Preferences and adding the tinymce code to: textpattern > lib > txplib_head.php.

Below: <script type="text/javascript" src="textpattern.js"></script>
Add: <script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>

Below: addEvent(window, 'load', cleanSelects);
Add:

addEvent(window, 'load', cleanSelects);
	tinymce.init({
		selector: "textarea#body"
	 });

I’m trying to figure out how to get txp images to work with an image plugin in v4. The native image plugin that comes with v4 is very basic. I’ve been looking at this 3rd party plugin: FileManager4TinyMCE and would love to get it working similar to Gil’s TXP Tip.

Offline

#1128 2014-01-23 11:01:42

dorka
Member
Registered: 2012-10-04
Posts: 90

Re: hak_tinymce WYSIWYG article editor

hakjoon wrote #238382:

I think i have a fix in place to deal with the site names not matching. It used to work this way and some point I changed it and it broke things.

The part I’m trying to figure out is the ajax call needs to call out to /textpattern/index.php, so i need to figure out how to point to that url in relation to where the script is being loaded from (which can be various different places).

I could maybe make the endpoint no need to run in an admin context but that kind fo scares me a bit.

Hi Hakjoon,
I just wonder, have you ever got a chance to solve the problem of tiny_mce not running on a multisite installation of txp? Thanks.

Offline

Board footer

Powered by FluxBB