solved How to Add A TinyMCE Box on an Edit button?

Ken Rich
Ken Rich
@ken-rich
11 years ago
926 posts
I would like to add a tinyMCE edit box to a template for creating a user editable space.

So how can one do it so that the edit box is hidden unless in a button is clicked for edit mode , similar to page creation. However, in this case not creating a new page but only edit a part of a page with other things on it.

The edited space needs to expand and contract (within set column limits) according to what is added to it, and when saved the tinymce box is hidden again and accessed by a button.




--

Ken Rich
indiegospel.net

updated by @ken-rich: 01/22/15 12:49:22PM
michael
@michael
11 years ago
7,772 posts
You would need to build a module for it. What the user puts into the space would need to be stored in a datastore.

Its not a trivial thing that your asking. Where are you wanting to put it? In the profiles section or the main site section?

As a light overview the steps would be:
* add the text area to the template (html)
* initiate the textarea to be un-hidden and have the tinymce editor put into it (javascript)
* save the contents of the editor. (javascript and php)
* display the previously saved content (php and html)

So its going to be a bit fiddly while you learn how to build a module. (unless you can use an already existing module, but need to know the answers to the questions above to follow that path further.) :)
Ken Rich
Ken Rich
@ken-rich
11 years ago
926 posts
Hi Michael,

As a former Ningster, user editable spaces is one of the big things I miss.

For now I would be happy to have it in one specific area. The top of the profile index in Ningja (where the bio currently shows by default).

I have moved my bio under the profile pic (side column) because I think it's important to show it, no matter what one chooses as the default landing page.

So instead of the member writing in a text box in his admin section to fill that area with his bio, I want to put a hidden edit box there and give complete control of that space to the profile owner.

If a module has to be built that's way out of my league.


--

Ken Rich
indiegospel.net
michael
@michael
11 years ago
7,772 posts
By user editable spaces do you mean you as the admin user edits it for the profile owner or the profile owner edits it for themselves?

There is the "Profile Biography" that is associated with the profile. Thats a "tinyMCE edit box that the profile owner can edit".

Is that not enough?

Do you want another box like the "Profile Biography" box? Because thats easy too using the Form Designer.
Ken Rich
Ken Rich
@ken-rich
11 years ago
926 posts
Hi Michael,

I want the profile owner to be able to edit it for themselves.

The profile biography is no longer sent to that space (top of profile index) in my network, it goes in the side column.

To me that is a much more logical place for it, since it is viewable no matter what landing page is chosen.

However, a similar set-up would work, except the edit box needs to be hidden on a button on the profile index itself, rather than in the admin panel.

It's not intuitive to go to a different location to input data. A hidden (on a button) WYSIWYG editor that controls the space right where it is located (top of profile index), is what I am shooting for.


--

Ken Rich
indiegospel.net
michael
@michael
11 years ago
7,772 posts
Your trying to blend a data entry point into the data output point. The profile page that the visitor looks at is the output point.

The admin panel is the input point.

You would need to do something custom to be able to make both areas in the same location.

If you can live with the editor staying on the profile update page, then you can add another form field to the profile update form like this:

* go to the Profile Update form (via the "change image" button on the profile)
* click on "Form Designer"
* in "new field name " put profile_whatever where 'whatever' is what you want to call it.
* click "Create New Field"
* under the "type" section choose "Editor" and make it active.

That will add the editor.

Then you edit the profile template where you want to the output to be output and put {$profile_whatever} to output it.

You could have a button visible there to the profile admin with "Click here to edit" if you wanted.

Thanks for the description, I can understand what you want. Its would require a module to do that and skin specific integration. So it would need to be custom.
Ken Rich
Ken Rich
@ken-rich
11 years ago
926 posts
Thanks Michael... Not sure why Jamroom doesn't already have a module like that, since a "pop-out" WYSIWYG editor is done almost universally elsewhere.

However, I can live with the solution you suggest and maybe what I'm describing will be developed on Jamroom someday. Thanks...


--

Ken Rich
indiegospel.net
michael
@michael
11 years ago
7,772 posts
Ken_Rich:...Not sure why Jamroom doesn't already have a module like that....
Its would require skin level implementation. Its a feature that isn't needed for all locations. It can be implemented if needed.
Ken Rich
Ken Rich
@ken-rich
11 years ago
926 posts
Well maybe it can become standard in the Ningja skin to have some user editable spaces on the Home page and Profile Index.

It's something all Ningsters are used to having, and it feels very "limiting" to not be able to WYSIWYG design within spaces.

On the NingNova skin I hard coded a block of space just so I could write a basic welcome message. Many Ningsters would not be able to do such a thing, but would want to if they could.

I would even say it would be a "deal breaker" for many, as that ability is a "basic" requirement for site building .


--

Ken Rich
indiegospel.net
brian
@brian
11 years ago
10,148 posts
Ken_Rich:
Thanks Michael... Not sure why Jamroom doesn't already have a module like that, since a "pop-out" WYSIWYG editor is done almost universally elsewhere.

Having developed Jamroom for 11+ years, only new Ning users (like you) have ever asked for this, so it's not something we've created. Anything custom like this would be made specific to the Ning modules/skins.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
11 years ago
926 posts
Yes, I understand that. It would be a Ningja innovation if done at all.


--

Ken Rich
indiegospel.net

updated by @ken-rich: 12/18/14 12:42:05PM