Overview of creating a block using a different editor for content?
Permalink
I am wondering if someone can give me an overview of what is involved in creating a content block using a different editor?
I've been looking through the existing default content block and given that it has virtually no comments in the code it's like gooblygook Greek to me at this point so I am not following what it is doing very well so that I can imitate it but using a different editor.
I just need an overview. Some kinda of direction to take.
Which database table holds the content of content blocks?
Can I pull from this table and change the contents such that any other block using the TinyMCE editor will pull in the changed content without a problem?
If I create and use my own content block using a different editor within it will it affect any other block in C5? In other words is the content block present now a self-contained piece of code that does not have tentacles into other blocks or is otherwise entangled with the functionality from some other part of C5?
Anything else anyone might care to share with me on this from an overview perspective would be appreciated.
Thanks.
Carlos
PS. I do not want my clients to use TinyMCE nor do I want to keep using it myself...it just gets in my way so my aim is to replace it entirely.
I've been looking through the existing default content block and given that it has virtually no comments in the code it's like gooblygook Greek to me at this point so I am not following what it is doing very well so that I can imitate it but using a different editor.
I just need an overview. Some kinda of direction to take.
Which database table holds the content of content blocks?
Can I pull from this table and change the contents such that any other block using the TinyMCE editor will pull in the changed content without a problem?
If I create and use my own content block using a different editor within it will it affect any other block in C5? In other words is the content block present now a self-contained piece of code that does not have tentacles into other blocks or is otherwise entangled with the functionality from some other part of C5?
Anything else anyone might care to share with me on this from an overview perspective would be appreciated.
Thanks.
Carlos
PS. I do not want my clients to use TinyMCE nor do I want to keep using it myself...it just gets in my way so my aim is to replace it entirely.
Thanks again Jordanlev! I mean for your input.
Great!
Yesterday I pretty much resigned myself to the need for me to dig into the source code of these things big time to get an absolute grip of what in the world C5 does both so that I can modify it to suit my needs and so that I can write better documentation for it's use.
I took the html block, which is way easier to understand than the content block, and was working on integrating the whizzy editor into it.
I've almost got it I think but I need to find where in the source code the page that comes up when one edits the html block is generated (so that I can put the appropriate Javascript in the header section...though I suppose I could put the Javascript anywhere...I'm still playing around with it).
But your suggestions are good one's as always. I'll take a look at what you mentioned Jordanlev.
Thanks for the overview of how one could go about doing this. I'll take a look at what you are developing too.
Carlos
Great!
Yesterday I pretty much resigned myself to the need for me to dig into the source code of these things big time to get an absolute grip of what in the world C5 does both so that I can modify it to suit my needs and so that I can write better documentation for it's use.
I took the html block, which is way easier to understand than the content block, and was working on integrating the whizzy editor into it.
I've almost got it I think but I need to find where in the source code the page that comes up when one edits the html block is generated (so that I can put the appropriate Javascript in the header section...though I suppose I could put the Javascript anywhere...I'm still playing around with it).
But your suggestions are good one's as always. I'll take a look at what you mentioned Jordanlev.
Thanks for the overview of how one could go about doing this. I'll take a look at what you are developing too.
Carlos
If you want to create your own, and you don't care about those kinds of additional features, you should check out the free "markdown" block in the marketplace and look at its code. In the add/edit file, it probably just has a textarea -- you would take the javascript for whatever WYSIWYG editor you're using and apply it to that textarea instead.
For the view file, you would want to pull out whatever markdown conversion it's doing and instead just display the content from the saved field directly.
If none of this makes any sense to you, I'd say it's probably not going to be possible for you to create this kind of block (at this time -- I'm sure you could learn it if it's something you were motivated to do).
I've also created a custom content block generator that may or may not solve the problem you're having in a different way. It is not on the marketplace yet, but will be soon. In the meantime, you could read about it here (and there's a link to download it as well):
http://www.concrete5.org/community/forums/customizing_c5/check-it-o...