/**
  * This is taking data OUT of the database and sending it into the content editor.
  * @dataProvider contentsFromEditMode
  */
 public function testFromEditMode($to, $from)
 {
     $translated = LinkAbstractor::translateFromEditMode($from);
     $this->assertEquals($to, $translated);
 }
Example #2
0
		function getContentEditMode() {
			return LinkAbstractor::translateFromEditMode($this->content);
		}
				<?php 
echo $form->checkbox('useCustomMessage', '1', $useCustomMessage);
?>
				<?php 
echo t('Use a custom message');
?>
			</label>
		</div>
	</div>
	<div class="form-group" id="reblo-customMessage"<?php 
echo $useCustomMessage ? '' : ' style="display: none"';
?>
>
		<?php 
echo $form->label('customMessage', t('Custom message'));
?>
        <?php 
echo Core::make('editor')->outputBlockEditModeEditor('customMessage', isset($customMessage) ? LinkAbstractor::translateFromEditMode($customMessage) : '');
?>
    </div>

	<script>
	$(document).ready(function() {
		$('#ccm-tab-content-redirect-options .redactor-editor').css({'min-height': '0px', height: '100px'});
		$('#ccm-tab-content-redirect-options #useCustomMessage').on('change', function() {
			$('#ccm-tab-content-redirect-options #reblo-customMessage')[this.checked ? 'show' : 'hide']();
		});
	});
	</script>
</div>
 public function getParagraphEditMode()
 {
     return LinkAbstractor::translateFromEditMode($this->paragraph);
 }