Category Archives: Tinymce Edior

Remove Paragraph (p) tags – TinyMCE HTMLeditor

Solution

In order to remove the paragraph or p tags that automatically gets inserted by TinyMCE, open the tinymce.js file and include the following lines:

force_p_newlines : false,
force_br_newlines : true,
forced_root_block : ”,

Problem:

Hi guys,

is there a way to disable the paragraph tag (<p>). I know that I can make a blank line if I push SHIFT + ENTER. But for me thats no real solution. I’m using TinyMCE successfully for some of my customers and those can’t handle with that solutions.

Is there a hack or anything else that I can disable that? I don’t want any <p> only <br /> should be made.

Thanks for answers ahead!

chameleon

Solution:

I don’t know how many times I told people to:
1) Check the manual
2) Search the forums
3) Once done 1 & 2, THEN post on the forums.

anyway, what you are looking for is force_br_newlines & force_p_newlines:

force_br_newlines : true, force_p_newlines : false

Solution 2:

<script>
tinyMCE.init({

                force_p_newlines: false
});
</script>

How to disable the Tinymce Browser in Selected Textarea

  • Please First read the Documentation of TInymce Editor Carefully Because The documentation of tinmce editor is the best one.
  • If you haven’t read about the general configuration , Click here
  • If you haven’t read about setting height and width , Click here
  • Ok, Lets come to the point i.e Displaying the tinymce editor in the desired textareas.
  • Here is the Setting
  • tinyMCE.init({
    // General options
    mode : “specific_textareas”,
    editor_selector : “texteditor”,
    mode:”textareas”,
    theme : “advanced”,
    editor_deselector : “noeditor”,
    width : 700,
    height : 400,
  • How to Use, Here is the Code if you want to Exclude the Tinymce Browser in the Textarea,
  • <textarea class=”noeditor” name=”some_name”></textarea>
  • If you want to Include the Tinymce Editor  Here is the Sample,
  • <textarea name=”some_name” class=”texteditor”></textarea>
  • Hope you enjoyed …..
  • Related Website   Click Here or Click Here

Setting height and width in Tinymce Editor

    • If you havent read the basic Setting please Read , and
    • <html>
    <head>
    <script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
    <script language="javascript" type="text/javascript">
    tinyMCE.init({
            theme : "advanced",
            mode : "textareas",
           width : 700,
            height : 400
    });
    </script>
    </head>
  • The height and width of the Tiny Browser as specified above. Enjoy….

Tinymce Editor Basic Configuration

  • Download the Tinymce Editor in your Project Folder
  • In order to initialize the TinyMCE the following code must be placed within HEAD element of a document. The following example is configured to convert all TEXTAREA elements into editors when the page loads. There are other modes as well.
  • <html>
    <head>
    <script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
    <script language="javascript" type="text/javascript">
    tinyMCE.init({
            theme : "advanced",
            mode : "textareas"
    });
    </script>
    </head>
  • Enjoy the Editor in your textareas