• Resolved meravjon

    (@meravjon)


    Hi just installed the plugin after trying the embed code + css and it didn’t work.
    So I’m tring to get direction: rtl.
    Tried lots of vars that in google devloper tool did the job but can’t get it on my site.
    here are some of the codes I tried:

    .h5p-container, .h5p-standalone, .h5p-question, .h5p-drag-text{
    	direction: rtl !important;
    }
    .h5p-content.h5p-initialized.h5p-frame {
        direction: rtl !important;
    }
    html.h5p-iframe {
        direction: rtl !important;
    	z-index: 100;
    }

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author icc0rz

    (@icc0rz)

    Where are you inserting the CSS?

    Did you try following this guide?

    Thread Starter meravjon

    (@meravjon)

    Hi
    Thanks for reply. At first I tried to insert the CSS om my style.css in my child theme, but didn’t saw that guid. so made some changes in the core plugin * {direction:rtl}. now it works.Also did some changes on the specific css in the upload library. Any way now I folowed the guid and I’ll try doing it in the right way.
    also having some problems with the text editor. can I continue here?

    Plugin Author icc0rz

    (@icc0rz)

    I’m glad to hear you got it working.

    Sure, what’s the problem with the text editor?

    Thread Starter meravjon

    (@meravjon)

    OK I wrote this on my functions.php folowing your guid

    /* adding buttons to text editor h5p */
    function mymods_h5p_semantics_alter(&$semantics, $content_type, $major_version, $minor_version) {
      foreach ($semantics as $field) {
        // Go through list fields
        while ($field->type === 'list') {
          $field = $field->field;
        }
       
        // Go through group fields
        if ($field->type === 'group') {
          mymods_h5p_semantics_alter($field->fields); // Check function name!
          continue;
        }
       
        // Check to see if we have the correct type and widget
        if ($field->type === 'text' && isset($field->widget) && $field->widget === 'html') {
          // Found a wysiwyg/CKEditor field. Add sub/sup buttons.
          if (!isset($field->tags)) {
            $field->tags = array();
          }
    	  $field->tags = array_merge($field->tags, array(
            'table',
            'thead',
            'tfoot',
            'tbody',
            'tr',
            'th',
            'td'
          ));
          if (!in_array(‘u’, $field->tags)) {
            $field->tags[] = ‘u’;
          }
          if (!in_array(‘rtl’, $field->tags)) {
            $field->tags[] = ‘rtl’;
          }
          if (!in_array(‘colors’, $field->tags)) {
            $field->tags[] = ‘colors’;
          }
          if (!in_array('sub', $field->tags)) {
            $field->tags[] = 'sub';
          }
          if (!in_array('sup', $field->tags)) {
            $field->tags[] = 'sup';
          }
          if (!in_array(‘img’, $field->tags)) {
            $field->tags[] = ‘img’;
          }
        }
      }
    }
    add_filter('h5p_alter_library_semantics', 'mymods_h5p_semantics_alter');

    But on my tool bar the ‘u’ ‘img’ and ‘rtl’ do not apear

    Plugin Author icc0rz

    (@icc0rz)

    This part is only for which tags the authors should be allowed to use. It does not control the CKEditor buttons/plugins.

    The buttons need to be enabled through JavaScript, by adding it to the Toolbar. See the JavaScript example in this guide.

    Thread Starter meravjon

    (@meravjon)

    Thanks for reply icc0rz
    The ‘u’ ‘img’ does apear on the plugin Java as the others apart from the ‘rtl’ so they should be warking too. For the ‘rtl’I gues I should build the plugin. Am I wrong?
    Also I want the students to be able to use the toolbar as the site is for chemistry users. Is it possible?

    Plugin Author icc0rz

    (@icc0rz)

    Yes, some of the CKEditor plugins are bundled. If you want to use additional plugins they will have to be added.

    I thought the RTL was already built into the bundle and that it only needs to be enabled, but I may be mistaken.
    Hopefully, in the future, we will have a setting or option to easily enable RTL when needed.

    Currently, I don’t think any of the student parts contains a WYSIWYG, so there may be some work involved modifying the content type to support this.

    Thread Starter meravjon

    (@meravjon)

    So if I need the student to write: O<sub>2<sub> I can’t?
    Also couldn’t find a linear graf. Am I missing that?

    Plugin Author icc0rz

    (@icc0rz)

    No, I don’t believe there are any content types that support that today. It will have to be developed or support added to an existing content type.

    Unfortunately, no linear graph tool exist today either.

    Thread Starter meravjon

    (@meravjon)

    Hi
    Thanks again for reply.
    Needs customization of plugin. Paid work of course.
    Is it possible?

    Plugin Author icc0rz

    (@icc0rz)

    If you send a detailed description of the changes to contact at?joubel.com we should be able to provide you with a quota for the work.

    Thread Starter meravjon

    (@meravjon)

    OK Thanks. Doing it now

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘css to RTL’ is closed to new replies.