• Resolved patriqueuiliam

    (@patriqueuiliam)


    Hi! I put a text editor in the text area (TinyMCE or Jqueryte – in the event description), but it only works when we publish the event.
    When we go to edit, an html formatting disappears.
    How can I solve this?

    In short:

    1) Publishing events works great. Perfect.

    2) But for editing events, HTML formatting disappears.

    3) How to solve this problem?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author shanebp

    (@shanebp)

    Load the content into the editor and _not_ the textarea.

    Thread Starter patriqueuiliam

    (@patriqueuiliam)

    Hi shanebp!
    When I go to edit a published event, the html disappears. On the create event page.

    No show html: <?php echo $pp_ec->description; ?>

    Can you see this image?

    Specific example:
    https://drive.google.com/file/d/1d37QlRhbrNxl4sZZ6IfsFy7n_RJqlRrJ/view?usp=sharing

    <label for="event-description"><?php echo __( 'Description', 'bp-simple-events' ); ?>: *</label>
    		<textarea id="event-description" name="event-description" ><?php echo $pp_ec->description; ?></textarea>
    Plugin Author shanebp

    (@shanebp)

    Again – Load the content into the editor and _not_ the textarea.

    But you reply with an example that loads the content into the textarea !

    Google this: “tinymce editor edit load content”

    Thread Starter patriqueuiliam

    (@patriqueuiliam)

    Hello @shanebp! Sorry for the persistence in the question…

    I can put html formatting in textarea. However, the ?php echo $pp_ec->description; ? code does not print html on the page. I wanted it to print as it does if I use this code echo get_post_field('post_content', $post->ID); in single-event.php

    I can create the event normally using html. But when editing, the html disappears. I can use the text editor. But in this case, it’s the code <?php echo $pp_ec->description; ?> which does not print html. How can I make print html on profile-events-create.php page?

    Sorry for not being too clear. I’m using google translator.

    Image:
    https://drive.google.com/file/d/1fAILBX3R8RUwL8n-kNG602Ne_G_G8QV6/view?usp=sharing

    Thread Starter patriqueuiliam

    (@patriqueuiliam)

    I found a way to show the html inside TEXTARE in profile-events-create.php
    The php code echo $pp_ec->description; does not render the html. So I called the content via $_GET[“eid”];

    Before

    <textarea id=”event-description” class=”w3-input w3-border” name=”event-description” php echo $pp_ec->description; ?
    </textarea>

    Later

    <textarea id=”event-description” class=”w3-input w3-border” name=”event-description” >
    `php
    $my_postid = $_GET[“eid”];
    $content_post = get_post($my_postid);
    $content = $content_post->post_content;
    $content = apply_filters(‘the_content’, $content);
    $content = str_replace(‘]]>’, ‘]]>’, $content);
    echo $content;
    ?`
    </textarea>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Html (in textarea) does not work when editing an event’ is closed to new replies.