• category education

    Editor template is one of the 8 types of add-ons that Elanat framework supports. editor templates are part of a html page template; each of the editor templates helps content writers use a ready-made template to present their content in an orderly and best way.

    Step 1:

    Get the raw editor template file. Then unzip the zip file.You can download it in this link below:


    After this action, you will see two directories, one is the root directory and the other is a directory named editor_template. The root directory is empty and we will deal with it in the next steps. After opening the editor_template directory, we see 4 files, one of which is an HTML file named template, an icon file, an image file, and an XML file named catalog.

    Step 2:

    Open the catalog.xml file for editing.

    Add a name for your add-on in the value attribute in the editor_template_name tag.

    Add your name or your company's name in the value attribute in the editor_template_author tag.

    The value attribute in the editor_template_directory_path tag specifies the path of the add-on, and it is better to just be the name of a directory.

    The value attribute in the editor_template_physical_name tag specifies the physical name of the add-on, which is template.html here; if you rename this section, you must also edit the template.html file to the same name.

    The editor_template_replace tag contains the Elanat core variants of the framework, which is a detailed topic and we will skip its explanation here.

    If you are creating a server-side add-on, the editor_template_cache_parameters tag is used to cache the add-on based on query string parameters; write the cache parameters inside this tag and separate them with the comma (,).

    In the editor_template_static_head tag, you can call scripts and styles; in this tag, a javascript tag has been added and a method called AddHelloWorld has been added to it, and the string "Hello World!" puts it in the ElanatVariant.EditorTemplateValue variant; the values of the editor_template_static_head tag can be implemented on the add-on physical file, allowing you to access the values of the HTML inputs.

    The catalog.xml file contains other values as well, and only the important ones are mentioned in this explanation.

    Step 3:

    Edit the HTML file named template. As you can see, this file contains only one button that calls two JavaScript functions; the first function is AddHelloWorld(), which we already explained in step 2; after this function el_InsertEditorTemplateValueToWysiwyg() has been added; this function must be called. You can edit this file as you want and design it from scratch.

    Step 4:

    You can put your additional files that you want to add in any path of Elanat framework in the root directory. Redesign the icon and image file according to the add-on and create the zip file again in the last step. Your zip file is a editor template add-on that you can add to the Elanat framework open-source system.


    •  - You can add the el_InsertEditorTemplateValueToWysiwyg() function in the last line of your javascript function.
       - You can create a multipurpose editor template containing a large number of sets of values.
       - When the editor template is added to Wysiwyg, a br tag is also added so that the editor template is separated from the next lines by one line; So you don't need to add this tag.
       - When the editor template is added to Wysiwyg, ElanatVariant.EditorTemplateValue variant takes a null value.

    * The el_InsertEditorTemplateValueToWysiwyg() function should be called after the ElanatVariant.EditorTemplateValue variable is filled.

    In the link below, you can get add-ons of the editor template type:


    last comment
    please login or sign up to post a comment login - sign up